[pmwiki-users] How to set navigation aids in wiki page that get used by group header / footer

tamouse mailing lists tamouse.lists at gmail.com
Thu Oct 13 10:37:37 CDT 2011

On Wed, Oct 12, 2011 at 2:33 PM, Peter Bowers <pbowers at pobox.com> wrote:
> 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.

Don't I know it! I had been hoping like heck to avoid that, but it was
all I could get to work at the time.

> (1) I think the categories can be set a single time like this:
> (:if false:)
> Categories:[[!Cat1]], [[!Cat2]]
> (:ifend:)

I'll give this a go and see if it works.

> (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.)

I'll have to look into this -- it may be just what I need. I'm not
sure about the latter bit of adjusting the order of the (:tags ...:)
rule, though.

> (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.

That is my hope.

> 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...

Right -- I'm not necessarily looking for a big picture solution, either.


More information about the pmwiki-users mailing list