[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 16:56:42 CST 2005
Proposal:
1. <<|TrailPage|>> works as it does now.
2. <<|?TrailPage|>> returns '' if the current page is off-trail.
3. a cookbook recipe
(:trails ?Group1.TrailPage1 Group2.TrailPage2:)
returns
<<|?Group1.TrailPage1|>>(:nl:)(:nl:)<<|Group2.TrailPage2|>>
Discussion follows...
On Tuesday, 15 March 2005 11:04 AM, Patrick R. Michaud <pmichaud at pobox.com> wrote:
>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|>>
I like this, but am not sure about the + sign or how this would be
displayed. This seems more natural:
<<|?{$Group}.TrailPage Main.TrailPage
?PmWiki.DocumentationIndex|>>
Meaning: if there is a ? only show the trail if the current page
is on-trail. Also, long trails don't wrap well across lines. I
suggest putting each trail in its own <p class='wikitrail'>.
So <<|Main.TrailPage|>> behaves as it does now.
And <<|?PmWiki.DocumentationIndex|>> does the expected.
I think I like ? more than I'd like hiding off-trail pages as
the default.
>
>...
>
>But then perhaps that second one really ought to be
>
> <<+Main.TrailPage+>>
It seems not quite right that <<+Main.TrailPage+>> will return
<< Prev | TrailPage | Next >>
And I think <<|?PmWiki.DocumentationIndex|>> works better than
<<?PmWiki.DocumentationIndex?>>.
>
>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.
If we think this is the better default behaviour, consider = instead
of +. That is:
<<|{$Group}.TrailPage =Main.TrailPage
PmWiki.DocumentationIndex|>>
or
<<|=Main.TrailPage|>>
So which is more natural:
a. <<|?PmWiki.DocumentationIndex|>>
b.1 <<|=Main.TrailPage|>>
b.2 <<+Main.TrailPage+>>
I think I lean towards a, but not strongly.
--
JR
--
John Rankin
More information about the pmwiki-users
mailing list