data/TWiki/HierarchicalNavigation.txt
changeset 0 414e01d06fd5
child 1 e2915a7cbdfa
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/data/TWiki/HierarchicalNavigation.txt	Sat Jan 26 15:50:53 2008 +0100
     1.3 @@ -0,0 +1,63 @@
     1.4 +%META:TOPICINFO{author="TWikiContributor" date="1164471667" format="1.1" version="2"}%
     1.5 +%META:TOPICPARENT{name="WebHome"}%
     1.6 +---+!! Hierarchical Navigation
     1.7 +
     1.8 +*Navigation block that displays the current topic, its parent and children (if any).* %BR%
     1.9 +This is intended to be included in other topics, for example in a side navigation bar (WebLeftBar).
    1.10 +
    1.11 +_NOTE: The lookup for parent and children will increase the loading time of your pages._
    1.12 +
    1.13 +%TOC%
    1.14 +
    1.15 +---++ Usage
    1.16 +Two sections are defined:
    1.17 +   * =all=
    1.18 +   * =children=
    1.19 +   
    1.20 +---+++ Displaying the Parent - Current - Children block
    1.21 +<blockquote>
    1.22 +<verbatim>
    1.23 +%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="all"}%
    1.24 +</verbatim>
    1.25 +</blockquote>
    1.26 +generates:
    1.27 +
    1.28 +%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="all"}%
    1.29 +
    1.30 +
    1.31 +When included in WebLeftBar (using default Pattern skin) this is styled to:
    1.32 +
    1.33 +<div id="patternLeftBarContents">
    1.34 +%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="all"}%
    1.35 +</div>
    1.36 +
    1.37 +---+++ Displaying child topics
    1.38 +<blockquote>
    1.39 +<verbatim>
    1.40 +*Child topics:*
    1.41 +%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="children"}%
    1.42 +</verbatim>
    1.43 +</blockquote>
    1.44 +generates:
    1.45 +
    1.46 +*Child topics:*
    1.47 +%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="children"}%
    1.48 +
    1.49 +
    1.50 +<div style="display:none;">
    1.51 +%STARTSECTION{name="all"}%<div class="twikiHierarchicalNavigation"><div class="twikiParentTopic">
    1.52 +%SEARCH{ "^%BASETOPIC%$" web="%BASEWEB%" scope="topic" type="regex" nonoise="on" format="$percntIF{$quot$parent$quot then=$quot   * [[$web.$parent][$parent]]$quot else=$quot<nop>$quot}$percnt" }%<nop>
    1.53 +</div>
    1.54 +<div class="twikiCurrentTopic">
    1.55 +   * <nop>%BASETOPIC%
    1.56 +</div>
    1.57 +<div class="twikiChildTopics">
    1.58 +%METASEARCH{type="parent" topic="%BASETOPIC%" format="   * [[$web.$topic][$topic]]"}%<nop>
    1.59 +</div><!--twikiChildTopics--></div><!--/twikiHierarchicalNavigation-->%ENDSECTION{name="all"}%
    1.60 +
    1.61 +%STARTSECTION{name="children"}%<div class="twikiHierarchicalNavigation">
    1.62 +<div class="twikiChildTopics">
    1.63 +%METASEARCH{type="parent" topic="%BASETOPIC%" format="   * [[$web.$topic][$topic]]"}%<nop>
    1.64 +</div><!--twikiChildTopics--></div><!--/twikiHierarchicalNavigation-->%ENDSECTION{name="children"}%
    1.65 +
    1.66 +</div>
    1.67 \ No newline at end of file