Summary: Enable a WikiTrails markup to use a (:pagelist ... :) directive
Version: November 2005
Maintainer: Val?, SteveB?


To enable a WikiTrails markup to use a (:pagelist ... :) directive, either directly inside a WikiTrails markup <<(:pagelist ...:)>>, or when it forms part of the index page referred to in a normal WikiTrails instruction.


  • pagelisttrails.phpΔ -- development version that requires thorough testing.
  • pagelisttrails2.phpΔ -- newer version (November 2005) that still requires thorough testing, but at least appears to work on PmWiki2
  • pagelisttrails3.phpΔ -- Same as pagelisttrails2.php but PHP5.5 compatible (use markup_e() function)


This test version is a modification of PmWiki's trails.php (pmwiki-2.0.devel26)

It should be downloaded to the cookbook folder. The original "trails.php" should be disabled, and this new one included by putting


in the config.php file.

To use the script, add one or more (:pagelist ...:) directives to the index page specified in a normal WikiTrails markup. The script will use all pagelist directives, plus any other bulleted links on the page, to construct the trail.

Alternatively, put a pagelist directive directly in the WikiTrails markup, in the form <<(:pagelist ... :)>>. This method will produce just the 'previous' and 'next' links, and will align them to the left and right.

Note: trail links will be in 'simple format', using the full pagename, irrespective of the 'fmt' option specified. The 'list' option will still apply.

Alternative way to create trails without an index page:

The DynamicTrails recipe explains how to do create trails with a pagelist template and without installing any cookbook scripts or extra markup.

See Also


  • Something wrong with the sense of left and right here.
Because on the page PREVIOUS>> <<NEXT is produced (if I'm correct: since PMWiki2.0-beta18). Han, 05 feb 05
  • php ending line ?> missing in the php file. ~ V.Krishn
  • no longer working under pmwiki2.0 beta34. Han 24 april 2005
  • pagelist2.php should work under pmwiki2.0.12
  • when I add list=normal to a pagelist, it doesn't work. Why is that ?


It would be nice if the list excluded the groupname AND used the {$title} instead of the {$name} to list the pages. To make things perfect spacedwikiwords in the list would look much better. Han, march 13 05 at 15.20 CET

If you are directly embedding the pagelist in each page you can do this with DynamicTrails.


  • Val? November 17, 2004, at 12:33 PM
  • SteveB? November 9, 2005, at 11:11 PM


See discussion at PageListWikiTrail-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.