I'm working on a MediaWiki extension, how can I get the page ID and title?
Hey,
how can I get the page ID and title
Where do you need this? And what MediaWiki version(s) are you developing for?
If you are developing for MW 1.18 or later, on a lot of places you'll be able to call ->getTitle either on $this or some object passed along. This method is available on all stuff deriving from RequestContext. For earlier versions you can get the title object via the global $wgTitle. Once you have the title you can get the page name via ->getText or similar methods and the article id via ->getArticleID.
btw, such questions are better asked on wikitech: wikitech-l@lists.wikimedia.org
Cheers
-- Jeroen De Dauw http://www.bn2vs.com Don't panic. Don't be evil. --
mediawiki-l@lists.wikimedia.org