|
Cookbook /
FauxTrailSummary:Enable page listings to have a "trail-like" format via fmt=fauxtrail
Version:0.01
Prerequisites:PmWiki 2.2beta56, may work with earlier versions, but not tested
Status:beta
Maintainer:Kathryn Andersen
File:fauxtrail.phpΔ
Discussion: FauxTrail-Talk
Questions answered by this recipeHow can I get page listings to behave like a trail? DescriptionEnable page listings to have a "trail-like" format via fmt=fauxtrail This recipe creates a few different trail-like pagelist formats. They all basically look like this: << [[PrevPage|{PrevPage$Title}]] | [[Index Page]] | [[NextPage|{NextPage$Title}]] >> The main difference in the different formats is what page is used as the "index" page of the faux-trail. Because these are PHP-function formats rather than pagelist templates means that they are more efficient, and thus faster. ActivationTo activate this recipe, download fauxtrail.phpΔ and put it into your cookbook directory. Add the following line to your local/config.php:
include_once("$FarmD/cookbook/fauxtrail.php");
fmt=grouptrailThe grouptrail format makes a "trail" of pages in a group. The "index" page for this faux-trail is the home-page of the current group. This uses the special search-pattern "content" because the "normal" search-pattern excludes the current page, and these trail formats won't work if the current page is excluded.
fmt=fauxtrailThe fauxtrail format is the general form of the format. This takes extra options, so that you can customize it to your preference.
The following gives the same results as grouptrail:
Note that if the current page isn't part of the faux-trail, then the pagelist will give no results. (This is a feature, not a bug).
The fauxtrail markup is useful for more specialized trails; for example, a trail of everything in the same category.
fmt=trailtrailThe trailtrail format is slightly different. This looks for all the normal trails that the current page is part of, and displays the trails (as fauxtrail markup). If the current page isn't part of any trail, then nothing will be displayed.
NotesRelease Notes
CommentsSee Discussion at FauxTrail-Talk See AlsoContributors |