release
dev builds
extras
themes manual
wiki
device status forums
mailing lists
IRC bugs
patches
dev guide



Search | Go
Wiki > System > HierarchicalNavigation

Hierarchical Navigation

Navigation block that displays the current topic, its parent and children (if any).
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.

Usage

Two sections are defined:
  • all
  • children

Displaying the Parent - Current - Children block

%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="all"}%
generates:

When included in WebLeftBar (using default PatternSkin) this is styled to:

Displaying child topics

*Child topics:*
%INCLUDE{"%SYSTEMWEB%.HierarchicalNavigation" section="children"}%
generates:

Child topics:

When included in WebLeftBar (using default Pattern skin) this is styled to:

%STARTSECTION{"all"}%<div class="foswikiHierarchicalNavigation">
<ul>
%SEARCH{
   "parent"
   type="query"
   topic="%BASETOPIC%"
   web="%BASEWEB%"
   nonoise="on"
   format="<li class='foswikiParentTopic'>$percentICON{parent_gray}$percent [[$web.$parent][$parent]]</li>"
}%
<li class='foswikiCurrentTopic' style='font-weight:bold;'><nop>%BASETOPIC%</li>%INCLUDE{"%TOPIC%" section="childlist"}%
</ul>
</div><!--/foswikiHierarchicalNavigation-->%ENDSECTION{"all"}%

%STARTSECTION{"children"}%<div class="foswikiHierarchicalNavigation">
<ul>%INCLUDE{"%TOPIC%" section="childlist"}%</ul>
</div><!--/foswikiHierarchicalNavigation-->%ENDSECTION{"children"}%

%STARTSECTION{"childlist"}%%SEARCH{
   "parent.name='%BASETOPIC%'"
   web="%BASEWEB%"
   type="query"
   nonoise="on"
   format="<li class='childTopic'>$percentICON{line_ur_gray}$percent [[$web.$topic][$topic]]</li>"
}%%ENDSECTION{"childlist"}%
r1 - 23 Aug 2010 - 13:36:34 - ProjectContributor

Parents: WebHome
This site is powered by FoswikiCopyright © by the contributing authors. All material on this site is the property of the contributing authors.
Ideas, requests, problems regarding Wiki? Send feedback