[Mediawiki-l] Categories of current page
Platonides
Platonides at gmail.com
Wed Sep 5 16:33:56 UTC 2007
Andreas Rindler wrote:
> Hi,
> I am creating a tag extension that uses the categories of the current page.
> How can I get a list of all categories that are assigned on the page?
>
> And I don't want the parent categories. I have found
> $wgPageTitle = $parser->getTitle();
> $wgParentCats = $wgPageTitle->getParentCategories();
> but it lists all the parent categories as well.
>
> Thanks,
> Andi
I'd say that what you want is exactly getParentCategories()
"Get categories to which this Title belongs and return an array of
categories' names."
More information about the MediaWiki-l
mailing list