On Thu, Feb 28, 2008 at 05:33:10PM +0100, [EMAIL PROTECTED] wrote:
> * Gone with the wind ([[!Movies]], [[!Drama]])
> * Blues Brothers ([[!Movies]], [[!Musical]])
> * Red planet ([[!Movies]], [[!Science Fiction]]
>
> Any ideas on how to do this?
>
> Is there a way to get a list of which categories a partuclar page belongs
> to?
I suggest making a page variable for this:
$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;
}
See http://www.pmwiki.org/wiki/Test/CategoryPV for a demo.
Pm
_______________________________________________
pmwiki-users mailing list
[email protected]
http://www.pmichaud.com/mailman/listinfo/pmwiki-users