[Mediawiki-l] Template

Rowan Collins rowan.collins at gmail.com
Thu Jun 9 19:33:42 UTC 2005


On 09/06/05, Giovanni Putignano <gputignano at tiscali.it> wrote:
> A couple of questions:
> 1) I would like to create a template as this:
> <pre>
>     <?php
>         $language='{{{lang}}}';
>         $name='{{{name}}}';
>         ......
>     ?>
> </pre>
> but doesn't work.
> How can I do?

The wiki-syntax "<pre>" implies both an HTML "<pre>" and a wiki-syntax
"<nowiki>" (i.e. it suppresses all wiki markup). However, any line
beginning with one or more spaces is interpretted as pre-formatted
(i.e. HTML "<pre>") without suppressing markup, so your example should
work if you remove the "<pre>" and "</pre>" and make sure each line is
indented slightly.
 
> 2) Can I set a default value to a parameter?

No. See http://bugzilla.wikimedia.org/show_bug.cgi?id=364 for
discussion of whether this is necessary and possible, and how it
would/should work.

-- 
Rowan Collins BSc
[IMSoP]



More information about the MediaWiki-l mailing list