|
BreadCrumbTrail<< | Cookbook-V1 | >> Note: The recipes here are for PmWiki versions 0.6 and 1.0 only. For PmWiki 2.0 recipes, see Cookbook.
I moved the previous contents of this page (keeping track of the most recently visited pages) to VisitedPageTrail, to make room for a "bread crumb" trail following the common web usage. --Pm
QuestionHow can I add a "bread crumb trail" to my pages? AnswerFirst, define a variable called $BreadCrumbFmt that contains what you want output for the trail:
$BreadCrumbFmt = "<span class='breadcrumb'>
<a href='\$ScriptUrl'>Home</a> :
<a href='\$ScriptUrl/\$Group'>\$Groupspaced</a> :
\$Titlespaced </span>";
Then, simply add the variable Note that in this approach it's possible to have specialized per-group or per-page bread crumb trails by setting different values for $BreadCrumbFmt in PerGroupCustomizations. If you want to provide a bread crumb markup that authors can place into a wiki page to display a bread crumb trail, you can also add something similar to the following:
$DoubleBrackets['[[$Breadcrumb]]'] =
Keep(FmtPageName($BreadCrumbFmt,$pagename));
NotesComments
Contributors
pmwiki-2.2.0-beta68 -- Last modified by {{Francis}}
|