[Mediawiki-l] Variables on templates

Platonides Platonides at gmail.com
Mon Jun 14 14:16:48 UTC 2010

Juan Jesús Cremades Monserrat escribió:
> Hi,
> I was studying the Wikipedia Templates and I have see somes codes like this:
> style="{{{bodystyle|}}};{{{style|}}}"><tr>...
> But "bodystyle" isn't defined anywhere and it isn't invoked but has a value
> in the page result. Exists some meaning to define this values? Thanks.

Yes. It is set on call.

Eg. if you have tamplate foo containing:
<span style="{{{bodystyle|}}};{{{style|}}}">{{{1}}}</span>

You could call it as:
{{foo|Hello World!|style=color: blue|bodystyle=background-color: red}}

And the result will be:

<span style="background-color: red; color: blue">Hello World!</span>

More information about the MediaWiki-l mailing list