[pmwiki-users] using a page's category to generate a wikitrail

tamouse mailing lists tamouse.lists at gmail.com
Thu Mar 29 09:32:29 CDT 2012

How would I use a page's category to generate a wikitrail?

What I would like to do is generate a trail based on what category a
page is assigned to to make a trail of all the various items in the
category such as:

   prev || up || next

Presently, I'm doing this by setting a Parent page text variable for
each page and generating the trail based on all the pages assigned to
that parent, like so:

In any given page:


Then, in the GroupHeader:

(:pagelist $:Parent={*$:Parent} group={*$Group} fmt=#parenttrail

And #parenttrail is:

(:if false:)
(:template each :)
(:if2 equal {*$FullName} {=$FullName}:)
(:if3 ! equal "" "{>$Name}" :)[[{>$Name}|+]](:if3end:)
(:if3 ! equal "" "{<$Name}" :)[[{<$Name}|+]](:if3end:)

Instead of using the Parent PTV, I'd like to use the (first) Category
the page contains, which is usually set in:

(:Categories:[[!Cat1]], [[!Cat2]], ... [[!CatN]]:)

Is this possible?

(To see how this works now, visit

More information about the pmwiki-users mailing list