Table of contents

The WikiTrails feature allows wiki authors to create "trails" through sequences of pages in the wiki. You simply specify pages and their order on a "trail index", and then place the navigation markup on the pages that you will be navigating.

(Don't confuse the pagelist directive with WikiTrails - they are different animals as explained in the Q and A below.)

Trail index page link markup

The trail index page link has the same markup as a standard link,
this means for example you can specify:

<|[[TrailIndexPage | +]]|>

<<|[[TrailIndexPage | A description]]|>>

Trail index page links can be restricted by anchors (links to a specific location within a page),
this means you can have more than one trail on a page, or start a trail from a specific location in a page.

<|[[Trail Index Page(#trailstart#trailend)]]|>

Creating a trail

Before you can use a trail through a set of pages, you have to create a "trail index" on a separate page, which we will call the "trail index page".
On that trail index page, you simply create a numbered, bulleted, or definition list of links. (So every numbered or bulleted list of links implicitly creates a trail.)

It is important that each page name (link) be the first item following each bullet; any text or formatting in front of the page name link will exclude it from the trail.If you want to format your trail (list), you can include a CSS.

Observations

In general, indentation levels in the page list don't matter -- trails are a linear sequence of pages.

A page is part of the trail only if the page link immediately follows the list markup.

The list itself can be delineated by the use of anchors, allowing for multiple lists on a page, or for some list items to be excluded.

Using the trail

What makes a trail "work" is adding trail markup on the pages in the trail (i.e. the pages that are listed in the bullet/numbered list on the trail index page).

To build a trail, add trail markup like <<|[[TrailIndexPage]]|>> to a page, where TrailIndexPage is the page, described above, containing the bulleted list of pages in the trail. PmWiki will display the trail markup with links to any previous and next pages in the trail.

The trail markup can be placed anywhere in a group header or footer, or on a page. A page can contain multiple trail markups. If you are adding a trail to every page in a group, consider setting the trail markup in the Group Header or Group Footer pages instead of on every individual page in your group.

Path trail

^|[[TrailIndexPage]]|^ treats the list levels as a hierarchy and displays the "path" to reach the current page (i.e., a "breadcrumb" trail). In the example trail above, the markup ^|TrailIndexPage|^ on TrailPage4 would display as "TrailIndexPage | TrailPage2 | TrailPage4".
and for a trail path

Questions

The pagelist directive dynamically generates a list of pages. There are many ways to generate the list, including using a WikiTrail as the source. The pagelist directive then displays the pages that match the criteria using an optional template - for example displaying each page name on a separate line as a link or including the entire content. The pagelist directive currently does not have built-in navigation markup that you can put on the pages in the list. By contrast, WikiTrails are simply specified via links on an "index" page and you can put previous-next navigation markup on each page. The two serve very different purposes. WikiTrails are useful for specifying the pages in web feeds, for creating a "tour" through a predefined set of pages, and many other things.