Recent Changes - Search:

Cookbook

PmWiki

pmwiki.org

DynamicTrails

Summary: Dynamic WikiTrails with pagelist
Version: 1
Prerequisites: pmwiki 2.1
Status: experimental
Maintainer:
Categories: Links, CMS, WikiTrails

Questions answered by this recipe

How can I create a trail through the pages of a group without having a trailpage?

This section is optional; use it to indicate the types of questions (if any) this recipe is intended to answer.

Description

Add the following pagelist template formats to your Site.LocalTemplates:

#grouptrail

Dynamic trail of form prev.Name | Group | next.Name

[[#grouptrail]]
(:if equal {$FullName} {=$FullName}:)[[{<$FullName}|+]] | [[{$Group}]] | [[{>$FullName}|+]](:if:)
[[#grouptrailend]]

#grouptrail2

Dynamic trail of form <<prev | Group | next>>

[[#grouptrail2]]
(:if equal {$FullName} {=$FullName}:)[[{<$FullName}| &laquo; prev ]] | \
[[{$Group}]] | [[{>$FullName}| next &raquo; ]](:if:)
[[#grouptrail2end]]

Add to the group's GroupHeader or GroupFooter page the trail markup:

For a trail of form PreviousPageName | Group | NextPageName

(:pagelist group={$Group} fmt=#grouptrail :)

For a trail of form <<prev | Group | next>>

(:pagelist group={$Group} fmt=#grouptrail2 :)

The trail markup will link to previous and next pages in the group, and to the group's homepage. The group's homepage does not need to contain a list of pages, the pagelist markup is generating the trail links.

Variation: fmt=#nextontrail

dynamic trail of form NextPageName link

[[#nextontrail]]
(:if equal {$FullName} {=$FullName}:)Next page: [[{>$FullName}|+]](:if:)
[[#nextontrailend]]

Notes

Release Notes

If the recipe has multiple releases, then release notes can be placed here. Note that it's often easier for people to work with "release dates" instead of "version numbers".

Comments

How do you make sure that RecentChanges and GroupFooter don't show up in the navigation when using the Dynamic Trails recipe? ~Steve 6/5/06

Answer: Try using the list=normal option to PageList - Martin Fick June 05, 2006, at 11:24 AM
This worked for me: (:pagelist group={$Group} name=-RecentChanges,-GroupFooter fmt=#grouptrail :) ~Steve

Why the %trail% don't work before the pagelist - dynamic trail? MaBen Aug. 28, 2006

perhaps put it as part of the pagelist format template? HansB

See Also

Contributors

Edit - History - Print - Recent Changes - Search
Page last modified on May 17, 2007, at 03:01 PM