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

Patrick R. Michaud pmichaud at pobox.com
Mon Mar 14 16:04:23 CST 2005


On Tue, Mar 15, 2005 at 10:17:10AM +1300, John Rankin wrote:
> On Tuesday, 15 March 2005 4:18 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
> 
> 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.

I vote that we leave <<|TrailPage|>> as forcing a visible trail.
Thus in the first case, with one trail forced:

   (:trails {$Group}.TrailPage PmWikiDocumentationIndex:)
   <<|Main.TrailPage|>>

Or, if sequence is really important:

   (:trails {$Group}.TrailPage:)
   <<|Main.TrailPage|>>
   (:trails PmWiki.DocumentationIndex:)

Maybe this means we change the name of the (:trails:) markup to
better indicate that the trails appear only if the current page
is on them.

Or perhaps yet another solution is to provide some sort of alternate
flag or decoration on <<|...|>> to indicate that the trail should
be displayed even if the page isn't on it.  In fact, if we just
allow <<|...|>> to accept multiple page names, we again lose
(:trails:) and just end up with

  <<|{$Group}.TrailPage +Main.TrailPage PmWiki.DocumentationIndex|>>

which forces Main.TrailPage but displays the others only if the
current page is on those trails.  But more likely this is written

  <<|{$Group}.TrailPage|>> <<|+Main.TrailPage|>> <<|PmWiki.DocumentationIndex|>>

But then perhaps that second one really ought to be

  <<+Main.TrailPage+>>

and then <<|TrailPage|>> displays the trail only if the current page is
on it.  That kinda works for me, especially since we already have 
<|...|> and ^|...|^ for other ways of displaying a trail.

This still gives us <<|{$TrailPage}|>> if it's needed, and perhaps
we can even support form of <<|{$SiteTrails}|>> if we need multiple
of them.  But this last one sounds like creeping featurism to me,
and perhaps it's better done as (:sitetrails:) in a local customization
anyway.

Pm



More information about the pmwiki-users mailing list