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

chr at home.se chr at home.se
Mon Mar 14 02:37:34 CST 2005


On 14 Mar 2005, John Rankin wrote:

> Possible answers: 
> The TrailPage contains a (:trailpage:) directive, which pmwiki interprets 
> as an instruction to add ?trail=$FullName to any links which follow the
> directive. However, this doesn't help if you land on a page on a trail
> from somewhere other than the TrailPage. 

*lol* guess the name of the directive is a given here since I 
also suggested (:trailpage:).

> Or, pmwiki contains SDV($TrailPage,TrailPage); and an
> if (PageExists(FmtPageName("\$Group.$TrailPage",$pagename)))
> add ?trail=Group.TrailPage to all urls. An administrator can
> override the default $TrailPage at the group, wiki or farm level.
> 
> 
> Er, but what happens if a page is on more than one trail??

Quite... which is why something is needed to indicate which trail the user 
is currently traversing.

> >That said, I think it's very fair to say that <<||>> should be
> >changed to no output, and we need a decision about what <<|TrailPage|>>
> >should produce when the current page is not on TrailPage.
> 
> Well, it *could* be configurable. Suppose the default is that
> <<|TrailPage|>> -> '' when the current page is off the trail.

Or we say that <<|TrailPage|>> is always (never) visible, and use an 
extended version of the directive to control what happens. If 
<<|TrailPage|>> is alwasy visible (to remain backwards compatible), you 
could then use something like:
	(:trail TrailPage:)		- default visibility setting
	(:trail TrailPage +show:)	- always show
	(:trail TrailPage -show:)	- don't show

Bleh.. I don't like "show", but I hope you get the idea anyway... and 
reading John's thoughts below, maybe it is better to put the control of 
this on the trail page... I don't know.

> An author could override this by adding the following to TrailPage:
> 
>     (:showofftrail:)
> 
> Or, if the default is that <<|TrailPage|>> -> <<|TrailPage|>> when
> the current page is off the trail, an author can override this
> by adding the following to TrailPage:
> 
>     (:hideofftrail:)
> 
> I'm sure the choice of directive can be improved. Since we have to
> read the Trailpage anyway, looking for another directive is no big
> deal.

Using (:trailpage:) to indicate it's a trail page, we could simply add an 
argument to indicate that the trail reference should always be shown, e.g.

	(:trailpage +show-orphans:)

/C

-- 
Christian Ridderström, +46-8-768 39 44               http://www.md.kth.se/~chr




More information about the pmwiki-users mailing list