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 ?
Not for extension tags like <myExtension> - but parser functions like {{#myExtension}} can handle it just fine.
-- Jim R. Wilson (jimbojw)
On 5/9/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 ?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Yah, but the parameter passing is awfull as far as I can tell... no key/value. :-)
On May 9, 2007, at 4:05 PM, Jim Wilson wrote:
Not for extension tags like <myExtension> - but parser functions like {{#myExtension}} can handle it just fine.
-- Jim R. Wilson (jimbojw)
On 5/9/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 ?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
Well, it's a trade off. You can have name/value pairs with a tag extension -XOR- interpreted {{parameters}}.
Good luck!
-- Jim
On 5/9/07, Carlos Jorge Andrade carlos.andrade@gmail.com wrote:
Yah, but the parameter passing is awfull as far as I can tell... no key/value. :-)
On May 9, 2007, at 4:05 PM, Jim Wilson wrote:
Not for extension tags like <myExtension> - but parser functions like {{#myExtension}} can handle it just fine.
-- Jim R. Wilson (jimbojw)
On 5/9/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 ?
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
MediaWiki-l mailing list MediaWiki-l@lists.wikimedia.org http://lists.wikimedia.org/mailman/listinfo/mediawiki-l
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
cheers Brianna
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
mediawiki-l@lists.wikimedia.org