Template:T

From Hearthstone Wiki
Revision as of 17:13, 27 August 2013 by SBEyes (talk | contribs) (Created page with "<onlyinclude><includeonly><span class="templatexample"><nowiki>{{</nowiki><span class="templatelink">[[{{#ifeq:{{#sub:{{{1}}}|0|1}}|:|{{#sub:{{{1}}}|1}}{{!}}{{{1}}}|Template:{...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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.