[pmwiki-users] Category Markup

DaveG pmwiki at solidgone.com
Fri Dec 16 22:22:19 CST 2005



Patrick R. Michaud wrote:
> 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.
The way I use Categories, the Category pages do not exist, hence my use 
of the Category.GroupFooter. So this code returns nada.

> 
>>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).
I'll take a look, once pmwiki.org is back up :)

I think an possible way, which seems to produce the right results, but 
which I suspect is going to get slow as the site gets bigger:
    "(:pagelist 'Tags: ' list=normal:)"




More information about the pmwiki-users mailing list