Template:T/doc
A template link formatted in the style of the wikicode to use it. Can accept up to twenty paramters to show as examples.
Usage:
{{t|parameter1|parameter2|parameter3|parameter4|...|parameter20}}
Example (self-referential):
{{t|t|parameter1|parameter2|parameter3|parameter4|...|parameter20}}
{{t|parameter1|parameter2|parameter3|parameter4|...|parameter20}}
To show named parameters, you need to escape the equals sign using {{=}} as demonstrated here:
{{t|t|parameter1{{=}}value}}
{{t|parameter1=value}}
If you forget to do, the parameter won't show up at all, as shown here:
{{t|t|parameter1=value}}
{{t}}
This template is generally used only inline in text because this template can't preserve whitespace between parameters. Template documentation usually shows usage this way:
<nowiki>{{template name |parameter1=value |parameter2=value </nowiki>
(Note the space before <nowiki>
. This is wikicode shorthand for a <pre>
block.) This template is not able to preserve the more readable formatting seen above.
This wiki requires {{t/piece}} to format the parameters and use the templateexample
, templatelink
, paramname
, and paramvalue
CSS classes in MediaWiki:Hydra.css.