Manual talk:$wgTitle

Latest comment: 11 years ago by Bawolff in topic What to use instead?

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)Reply[reply]

if I understood correctly, you should use $context->getTitle(). Cf. Manual:RequestContext --Kipmaster 18:35, 11 December 2011 (UTC)Reply[reply]
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)Reply[reply]