[pmwiki-users] How to set navigation aids in wiki page that get used by group header / footer
Peter Bowers
pbowers at pobox.com
Wed Oct 12 14:33:26 CDT 2011
On Wed, Oct 12, 2011 at 7:23 PM, tamouse mailing lists
<tamouse.lists at gmail.com> wrote:
> (:Categories:[[!Cat1]], [[!Cat2]]:)(:if false:) [[!Cat1]] [[!Cat2]] (:ifend:)
> (:Tags: tag1, tag2:)(:if false:)(:tags tag1, tag2:)(:ifend:)
My suggestion doesn't deal with the big picture, but some minor
tweaking... The redundant setting of tags and categories is going to
be a real pain in the long run and will also be a source of errors if
an editor updates one but not the other.
(1) I think the categories can be set a single time like this:
(:if false:)
Categories:[[!Cat1]], [[!Cat2]]
(:ifend:)
(2) I'm not familiar with the (:tags ...:) markup, but I think you
could define a PTV pattern ($PageTextVarPatterns) which would read the
(:tags ...:) markup (just hardcoding the "tags" into the pattern).
(You may have to adjust the order of the (:tags ...:) rule to make
sure it runs earlier than the rule that removes the hidden PTV.)
(3) This would be your footer:
||border=0 width=100%
||'''Tags:''' {*$:tags} || '''Categories:''' {*$:Categories} ||
If that works then you should have a single definition of categories
and a single def of tags and the {*$:Tags} should be solved.
Whether there is a better "big picture" solution I will leave up to
others. But hopefully this will fine tune some things to some degree
on the existing solution...
-Peter
More information about the pmwiki-users
mailing list