|
Cookbook /
ExpandingMenuSummary: A sidebar menu that supports nested lists where the nested items are displayed only if the user is in that group
Version:
Prerequisites:
Status:
Maintainer: dstebila
Categories: Layout, Administration
GoalA sidebar menu that supports nested lists where the nested items are displayed only if the user is in that group. Features
SolutionPut emenu.phpΔ in your cookbook directory (you may have to create it). Add the following line to local/config.php: UseDecorate your existing sidebar menu with From the technical point of view, It does not affect any other lists outside Example (copy and paste to your page, it won't work here)(:emenu:) (:emenuend:) In this example, when the user is on any page in the Main group, only the first three items in the menu are displayed. When the user is on any page in the PmWiki group, all the menu items are displayed. DiscussionInspired by Cookbook-V1.Trail2Menu and based on TrackingMenu by mikei. I wish, someone would create a new type of menu, combining the advantages of TrailMenu and ExpandingMenu. As TrailMenu builds its list of menu items from a WikiTrail, no external urls or using headings is allowed. TrailMenu has the disadvantage of relying on building its menu items from WikiGroups - why should one have to create Groups only to be able to use them in a menu. Now a perfect menu would be called with a directive like Expanding Menu and thus still be able to build its item list from a simple unordererd list like TrailMenu, but not relying on the disadvantages of a WikiTrail. JK 2007-05-25
Hi - Is there a way to get emenu to work with hg subgroups? That is if the menu opens for the group Kingdom,it will also open for the (sub)group Kingdom-Fish and the (sub,sub)group Kingdom-Fish-Tuna? Thanks! LFS 14.June.2007 See also
Authordstebila, 17-Apr-2005 |