|
WebMenu<< | Cookbook-V1 | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
GoalProvide a menu to help navigate a large wiki. SolutionAdd a navigation menu. Based on the "WebMenu" from Twiki's GnuSkin. See it in action here and here(approve links). Both links are broken --Grieco Attach:webmenu.php - source code (08-Sep-2003) InstallationTo use, copy the include_once("local/webmenu.php")
to your Now load your wiki and create a new page named "WebMenu". Whatever you put on this page will appear in the navigation menu for that group. If you would like use the same menu for all groups, add the line: $DefaultWebMenu = "Main.WebMenu"; to your if ($action=="browse") include_once("local/webmenu.php");
WebMenu is easiest to set up when used in conjunction with FlexLayout. DiscussionI just uploaded a new version. It will now check for the existence of a WebMenu page before installing the hooks, preventing the big blank left margin on groups that do not use a menu. Also, instead of always including $DefaultGroup.WebMenu, I created a new global variable called Access to wiki pageI modified webmenu.php such that it looks for There should be a way to access Group and Title of the current wikipage (not
the WebMenu. $WikiGroup?, PmWiki?. [[$Title]9 always gives Applications are:
Did you try using the ThisPage: and ThisGroup: markup for this? You could put [[ThisPage:?action=edit Edit]] in the WebMenu and it refers to the currently browsed page, not the WebMenu itself. --Pm This works as long as it is in links. So for example !Tools [[<<]] [[ThisPage:-discuss discuss]] [[<<]] [[ThisPage:?action=edit edit]] [[<<]] [[ThisPage:?action=print print]] works fine. Still I could not find a way to incorporate the current group
and pagename (not the MenuPage) into the menu page itself. IMHO a minor problem.
Printable versionsI've changed my local version of
...and of course closing the if at line 34. The condition should take some global configuration variable in account, I think (e.g.,
make sure there are NO trailing spaces after the closing ?> in At the suggestion of Carlo Strozzi, I made a minor change that will fix the appearance of pages that do not have a webmenu. --Jason Perking 06 Sep 03 See AlsoFlexLayout possible Bug
WebMenu Problems with concatenation Contributors
pmwiki-2.2.0-beta68 -- Last modified by {{}}?
|