DynTrailMenu

Summary: Create a dynamic (expanding) menu based on a trail page
Version: 2014-10-29
Prerequisites: none
Status: stable
Maintainer: Webbird
Discussion: DynTrailMenu-Talk
Categories: WikiTrails, Menus

Questions answered by this recipe

I'd like to have a dynamic (expanding) menu based on an (existing) WikiTrail. How can I achieve this?

Description

DynTrailMenuΔ creates an expanding menu using a WikiTrail page. While TrailMenu does not allow to use external URLs, text items or spacers, DynTrailMenu does.

See this in action

For information in German language, please see: http://www.webbird.de/?n=PmWiki/DynTrailMenu

The main goal when creating this recipe was to have a single Trail page as base for a Sitemap and the Menu at the same time.

Installation

To use DynTrailMenu.phpΔ, simply download it, copy it into the cookbook/ directory, and add

    include_once("$FarmD/cookbook/dyntrailmenu.php"); 

to a local customization file.

To use this recipe, add the following markup to your menu page (f.e. Site.SideBar):

    (:pagelist trail=Cookbook.TrailMenu fmt=dyntrailmenu:)

...where "Cookbook.TrailMenu" is the name of your WikiTrail page, of course. (See PmWiki.WikiTrails for details on how to use WikiTrails)

Notes

Please feel free to submit your suggestions or questions below!

  • This recipe was last tested on PmWiki version: 2.2.24

Release Notes

2014-10-29
Removed some occurences of /e regexp modifier
2014-10-05
Found (and fixed) some errors with PMWiki 2.2.x and current PHP versions
2008-08-31
First release.
2008-09-02
Bugfix: "Spacers" (empty lines) did not work correctly

See Also

WikiTrails

Contributors

Webbird

Comments

See discussion at DynTrailMenu-Talk

User notes? : If you use, used or reviewed this recipe, you can add your name. These statistics appear in the Cookbook listings and will help newcomers browsing through the wiki.