|
Cookbook /
TraceTrailSummary: Trail history of the last (default=5) visited wiki pages
Version: 20060516
Prerequisites: pmwiki 2.1.5
Status: Stable
Maintainer: Americo Albuquerque
Categories: Links, WikiTrails
Questions answered by this recipeIs it possible to have a list of the previous n pages seen before? Yes, using this recipe tracetrail.phpΔ See the variables section for the only difference. BillReveile January 07, 2007, at 05:15 PM
Another version tracetrail3.phpΔ which remembers the trail history via a cookie - added by HansB June 23, 2008, at 04:50 PM DescriptionThis recipe creates a list of recent visited local pages that have the markup (:tracetrails:). Only pages with that markup are saved. You can put the markup in the GroupHeader or GroupFooter to have all pages of a group to be listed in the history trails. The history is not group dependent. That means that all pages with the (:tracetrails:) markup will appear on the trail list whatever group it belongs. Installation:Save the tracetrail.php into your cookbook directory. NotesThere are some variables that can be used to change the recipe's behaviour.
Also available in TraceTrail2.php
tracetrail3.php: additional variables and changesThe tracetrail list is kept as trace history in a cookie, so will be remembered from session to session.
How to put the trace on all pages ? See GroupHeaders and put something like (note the new line and the "\\\") $GroupHeaderFmt .= "(:tracetrails:)(:nl:)"; in your Workaround to show trails in your header'-I had a problem if i follow the instructions of the upper part the code breaks the layout of some pages like the one of PmWiki.BasicEditing, the span at the right dont shows properly in the default template, i spent a few hours how to work around this situation. First of all set your GroupFooterFmt to in your config
This will make your site to show the trails but it lookes really ugly in the footer, well, keep reading... Edit your tracetrail.php file and change the span tag for a div tag and set the id of the div to, lets say..., hiddentrails. From
To
This will make our div invisible Then edit your .tmpl file and put a new div, this div will show our menu add to the body tag an onLoad command <body onLoad="showMenu()"> Paste the next script at the header section
<script type="text/javascript" language="JavaScript">
function showMenu(){
inner = document.getElementById('hiddentrails').innerHTML;
document.getElementById('menuTrail').innerHTML = inner;
}
</script>
And add the div to the position where you want to see the menu I pasted it under the <div id='wikicmds'> section and it looks really nice <div class="menuTrail" id="menuTrail"></div> Well thats all hope it works-' Demo http://rootshell.be/~jeditec/pmwiki/pmwiki.php?n=PmWiki.BasicEditing |