head 1.1; access; symbols; locks; strict; comment @# @; 1.1 date 2007.01.16.04.11.59; author TWikiContributor; state Exp; branches; next ; desc @buildrelease @ 1.1 log @buildrelease @ text @%META:TOPICINFO{author="TWikiContributor" date="1164471667" format="1.1" version="1"}% %META:TOPICPARENT{name="WebHome"}% ---+!! Hierarchical Navigation *Navigation block that displays the current topic, its parent and children (if any).* %BR% This is intended to be included in other topics, for example in a side navigation bar (WebLeftBar). _NOTE: The lookup for parent and children will increase the loading time of your pages._ %TOC% ---++ Usage Two sections are defined: * =all= * =children= ---+++ Displaying the Parent - Current - Children block
%INCLUDE{"%TWIKIWEB%.HierarchicalNavigation" section="all"}%
generates: %INCLUDE{"%TWIKIWEB%.HierarchicalNavigation" section="all"}% When included in WebLeftBar (using default Pattern skin) this is styled to:
%INCLUDE{"%TWIKIWEB%.HierarchicalNavigation" section="all"}%
---+++ Displaying child topics
*Child topics:* %INCLUDE{"%TWIKIWEB%.HierarchicalNavigation" section="children"}%
generates: *Child topics:* %INCLUDE{"%TWIKIWEB%.HierarchicalNavigation" section="children"}%
%STARTSECTION{name="all"}%
%SEARCH{ "^%BASETOPIC%$" web="%BASEWEB%" scope="topic" type="regex" nonoise="on" format="$percntIF{$quot$parent$quot then=$quot * [[$web.$parent][$parent]]$quot else=$quot$quot}$percnt" }%
* %BASETOPIC%
%METASEARCH{type="parent" topic="%BASETOPIC%" format=" * [[$web.$topic][$topic]]"}%
%ENDSECTION{name="all"}% %STARTSECTION{name="children"}%
%METASEARCH{type="parent" topic="%BASETOPIC%" format=" * [[$web.$topic][$topic]]"}%
%ENDSECTION{name="children"}%
@