Manual talk:$wgTitle

From MediaWiki.org
Jump to navigation Jump to search

What to use instead?[edit]

Guys, what should I use instead of so useful $wgTitle in my extensions? I think the documentation here is need to be improved :) --Katkov Yury 11:44, 17 October 2011 (UTC)

if I understood correctly, you should use $context->getTitle(). Cf. Manual:RequestContext --Kipmaster 18:35, 11 December 2011 (UTC)
What specifically you should use depends on your code, but generally what kipmastser said (What is a ContextSource can sometimes be unclear though). Bawolff 19:27, 11 December 2011 (UTC)