Pm's CategoryList page variable seems very handy. Unfortunately it
didn't display anything for me.
My page simply contains:
Category: [[!Tag1]], [[!Tag2]]
(:markup:)
Categories found on this page: {$CategoryList}
(:markupend:)
and in config.php I have:
$FmtPV['$CategoryList'] = 'CategoryList($pagename, $page)';
function CategoryList($pagename, $page) {
preg_match_all('/(?:^|,)Category\.([^,]+)/', $page['targets'],
$x);
$out = '';
foreach ($x[1] as $n) {
$out .= "[[!$n]] ";
}
return $out;
}
Has it worked for anyone else?
Randy
On Feb 28, 2008, at 2:30 PM, Patrick R. Michaud wrote:
Is there a way to get a list of which categories a partuclar page
belongs
to?
I suggest making a page variable for this:
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users