[Mediawiki-l] [Wikitech-l] Categories of current page

Christensen, Courtney ChristensenC at BATTELLE.ORG
Wed Sep 5 12:55:16 UTC 2007


Could you get the page text and parse out the category line?  Might not
be the most elegant solution though.
-Courtney

-----Original Message-----
From: wikitech-l-bounces at lists.wikimedia.org
[mailto:wikitech-l-bounces at lists.wikimedia.org] On Behalf Of Andreas
Rindler
Sent: Wednesday, September 05, 2007 7:13 AM
To: MediaWiki announcements and site admin list;
wikitech-l at lists.wikimedia.org
Subject: [Wikitech-l] Categories of current page

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
_______________________________________________
Wikitech-l mailing list
Wikitech-l at lists.wikimedia.org
http://lists.wikimedia.org/mailman/listinfo/wikitech-l



More information about the MediaWiki-l mailing list