[pmwiki-users] Re: Dynamic wiki trails - passing along the name of the trail page

John Rankin john.rankin at affinity.co.nz
Mon Mar 14 15:17:10 CST 2005


On Tuesday, 15 March 2005 4:18 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>Or, if we now slap our hands to our collective foreheads, we find
>that we can eliminate $AutoTrailsFmt entirely by defining the
>markup as
>
>   (:trails {$Group}.TrailPage Main.TrailPage
>PmWiki.DocumentationIndex:)
>
>which says to generate <<|trail|>> links for any of the listed trails 
>that the current page happens to be a member of.  Now we've eliminated
>?trail= from uris entirely, and made it fairly easy to do large-scale trail
>manipulations at page, group, site, and skin levels.

Works for me...

There is still the question of how to render <<|TrailPage|>> when 
the current page is off-trail. The above implies no trail markup
for off-trail pages. To force visible trails, options include:

    (:trails {$Group}.TrailPage *Main.TrailPage 
        PmWiki.DocumentationIndex:)

where the * indicates make this trail always visible; or

    (:showtrails {$Group}.TrailPage Main.TrailPage 
        PmWiki.DocumentationIndex:)

which makes all trails in the directive visible.

The first is briefer; the second is clearer.

-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list