[Mediawiki-l] tags and template parameters

Fernando Correia fernandoacorreia at gmail.com
Mon Feb 5 12:43:17 UTC 2007


2007/2/5, Ittay Dror <ittayd at qlusters.com>:
>
> say i write a tag extension:
> function qwfProcessMyTag($text, $argv, &$parser) {
>
> }
>
> now, if the user uses it in a template as:
> <my-tag>
> {{{1}}}
> </my-tag>
>
> then $text in the function will be {{{1}}}. this will be the case regardless if the template is viewed, or a page containing it. the reason is the parser doesn't replace variables inside tags.

There is a behavior of the MediaWiki parser that prevents passing
template parameters to extensions. You can use a parser function
instead.

http://www.gossamer-threads.com/lists/wiki/mediawiki/77335



More information about the MediaWiki-l mailing list