Brianna Laugher wrote:
On 10/05/07, Carlos Jorge Andrade carlos.andrade@gmail.com wrote:
Hi,
Is it possible to pass variables (http://meta.wikimedia.org/wiki/ Help:Variable) to extensions ?
For exemple...
<myExtension snippet="Map" domain="domain.com" title="{{SUBPAGENAME}}" />
How do I set the page title as a parameter ? Is there any other way of doing this ?
global $wgTitle? see http://www.mediawiki.org/wiki/Manual:Global_variables
Please do not use $wgTitle in parser extensions. Use $parser->getTitle(), where $parser is the third parameter to tag-style callbacks or the first parameter to parser function callbacks.
-- Tim Starling