[pmwiki-users] Re: Dynamic wiki trails - passing along the name of the trail page
John Rankin
john.rankin at affinity.co.nz
Wed Mar 9 15:53:10 CST 2005
On Thursday, 10 March 2005 3:35 AM, chr at home.se wrote:
>On Wed, 9 Mar 2005, Patrick R. Michaud wrote:
>
>> >
> http://www.pmwiki.org/wiki/Test/SomePage?trail=Test/TrailPage
>
[snip]
>I think using GroupHeader/GroupFooter could work well for me...
>especially if there was someway to only insert this special markup
>if the argument is there... This means we'd need something
>like:
>
> (:if URI-arg-exists=trail:)
> Current trail: <<|{$URI-arg trail}|>>
> (:ifend:)
I think it's simpler than that: let the GroupHeader contain
<<|TrailPage|>>
If the current page is not on the trail, the markup returns ''
instead of the current <<|TrailPage|>>.
This will also automatically drop the trail navigation from the
Printable View.
Note an author can have a GroupHeader (or Footer) that contains:
<<|TrailA|>>
<<|TrailB|>>
and 'it just works'.
And an administrator can put the following into a template
(give or take syntax errors)
<!--markup:<<|$TrailPage|>>-->
where config.php contains, for example,
SDV($TrailPage,'HomePage');
Again, 'it just works'.
In other words, this approach requires no new features, just a
small change to the handling of existing trail markups.
This could even be a configurable parameter, for sites that
*want* the output to be <<|TrailPage|>> for off-trail pages.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list