[Mediawiki-l] getting namespace of current page in php

Alexis Moinet alexis.moinet at fpms.ac.be
Wed Oct 4 15:54:07 UTC 2006


maybe using : global $wgTitle ?

then :

$wgTitle->getNamespace() (returns integer value)
$wgTitle->getNsText() (returns string value of namespace, in the wiki language)

  (see these functions in /includes/Title.php for details)





More information about the MediaWiki-l mailing list