[pmwiki-users] Re: Re: Re: Dynamic wiki trails

John Rankin john.rankin at affinity.co.nz
Wed Mar 16 20:50:20 CST 2005


On Wednesday, 16 March 2005 9:56 PM, chr at home.se wrote:
>> This could be achieved, I think, by combining [[!trail]] labels with
>> ?trail=TrailPage in the url for previous and next links.
>> 
>> Would that work for you?
>
>Yes, definitely. Although I think [[!trail]] is not strictly neccessary,
>since it really just servers as a way to tag a page by saying that it is a
>trail page. We should probably generalize this so that a page can do
>something like (:trails !TrailType1:) and only show trail links for trails
>belonging to the category 'TrailType1'.
>
>Maybe it's time to summarize how all this would work... this thread is
>long enough as it is...

Will do... Just one more comment:
The advantage of using [[!trail]] category labels is that we get the
category features for free. Otherwise, we have to introduce a new
directive so pmwiki can find all the trail pages.

And in your generalised case, we'd do the following (for example):

TrailPage1 and TrailPage2 contain [[!trailA]]

TrailPage3 contains [[!trailB]]

Category.TrailA contains [[!trail]]

Category.TrailB contains [[!trail]]

Main.GroupHeader contains (:trails TrailA:) so generates trails
from TrailPage1 and TrailPage2.

Other groups would generate trails for all trail categories.

And there is nothing special about TrailA of course.

If I put (:trails Rats:) in a group header, pmwiki would
generate trail navigation for any pages in [[!rats]]. Only
it would use the list of pages on Category.Rats, instead of
the lists of pages on TrailPage1 and TrailPage2. All that's
required to make this work is for pmwiki to recognise
that a Category.Cat123 page is in Category.Trail and the
pages in Category.Cat123 hold the list of pages in that
category.

In other words: (:trails xyz:) can works for wiki categories
*and* wiki trails. That is cool! This may have been obvious 
to you, it has just taken me a while to arrive.


-- 
JR
--
John Rankin






More information about the pmwiki-users mailing list