FANDOM


m (moved Template:Infobox Film to Template:T: rv - this is NOT how you create new templates)
(add "style" parameter allowing output to be displayed as code)
Line 1: Line 1:
<nowiki>{{</nowiki>{{#if:{{{prefix|}}}|{{{prefix}}}:}}[[Template:{{{1}}}|{{{1}}}]]<!--
+
{{#ifeq:{{{style|}}}|code|<code>}}<nowiki>{{</nowiki>{{#if:{{{prefix|}}}|{{{prefix}}}:}}[[Template:{{{1}}}|{{{1}}}]]<!--
 
-->{{#if:{{{2|}}}|&#124;<span style="color:gray;">''&lt;{{{2}}}&gt;''</span>}}<!--
 
-->{{#if:{{{2|}}}|&#124;<span style="color:gray;">''&lt;{{{2}}}&gt;''</span>}}<!--
 
-->{{#if:{{{3|}}}|&#124;<span style="color:gray;">''&lt;{{{3}}}&gt;''</span>}}<!--
 
-->{{#if:{{{3|}}}|&#124;<span style="color:gray;">''&lt;{{{3}}}&gt;''</span>}}<!--
Line 20: Line 20:
 
-->{{#if:{{{20|}}}|&#124;<span style="color:gray;">''&lt;{{{20}}}&gt;''</span>}}<!--
 
-->{{#if:{{{20|}}}|&#124;<span style="color:gray;">''&lt;{{{20}}}&gt;''</span>}}<!--
 
-->{{#if:{{{21|}}}|&#124;<span style="color:gray;">''&lt;{{{21}}}&gt;''</span>}}<!--
 
-->{{#if:{{{21|}}}|&#124;<span style="color:gray;">''&lt;{{{21}}}&gt;''</span>}}<!--
--><nowiki>}}</nowiki><noinclude>
+
--><nowiki>}}</nowiki>{{#ifeq:{{{style|}}}|code|</code>}}<noinclude>
 
{{documentation}}</noinclude>
 
{{documentation}}</noinclude>

Revision as of 00:55, July 18, 2011

{{[[Template:{{{1}}}|{{{1}}}]]}}

Export this template, then import, to install it.
Use edit summary: Copied from [[w:c:templates:Template:T]] to properly attribute this template's editors.
This template is probably already on your wiki.
Template documentation
Note: the template above may sometimes be partially or fully invisible.

View or edit this documentation. (How does this work?)

Editors can experiment with this template's sandbox and test case pages.
Description
A template link with a variable number of example parameters (0–20), which can be used to show example inputs.
Syntax
{{t|parameter1|parameter2|parameter3|parameter4|...|parameter20|prefix=...}}
Sample code
{{t|welcome}} gives...
{{welcome}}
{{t|welcome|Item1|Item2|Item3|Item4|Item5|...}} gives...
{{welcome|Item1|Item2|Item3|Item4|Item5|...}}
{{t|welcome|2=param1=Item1}} gives...
{{welcome|param1=Item1}}
{{t|welcome|prefix=subst}} gives...
{{subst: welcome}}
{{t|welcome|style=code}} gives...
{{welcome}}
See also
{{t2}}
{{s}}
Community content is available under CC-BY-SA unless otherwise noted.