[pmwiki-users] Category Markup
Patrick R. Michaud
pmichaud at pobox.com
Fri Dec 16 22:13:22 CST 2005
On Fri, Dec 16, 2005 at 11:09:07PM -0500, DaveG wrote:
> In order make the category markup a little more user friendly, and in
> order to get the categories in the header, I created a markup:
>
> Markup('^Tags:', 'directives', '/^Tag(s?):\s(.*)/ie',
> "PZZ(\$GLOBALS['Categories']=format_Categories('$2'))");
>
> that takes: "Tags: tag1, tag2, tag3"
>
> and creates the a $GLOBAL in the normal pmwiki format "[[!tag1]],
> [[!tag2]], [[!tag3]]"
>
> I then reference the $GLOBAL in the skin template header.
>
> Great. Works fine. Until... clearly the problem is that when I use
> "(:pagelist '[[!{$Name}]]' list=normal:)" in the Category.GroupFooter,
> no pages are listed.
Maybe use (:pagelist link=Category.{$Name} list=normal:) instead?
It's also usually faster.
> Alternatively, is there a mechanism in PmWiki to convert text (or apply
> a 'markup' like function to the text) to true PmWiki format when the
> user pushes save, and then convert to simple format when the user hits Edit?
Yes, via the $ROSPatterns array ("replace on save" -- see
http://www.pmwiki.org/wiki/PmWiki/EditVariables).
Pm
More information about the pmwiki-users
mailing list