Templates Wiki
Templates Wiki
(there's no need to check {{{style}}} for a specific value)
Tag: sourceedit
(remove a bunch of unnecessary spaces)
(6 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{#if:{{{style|}}}|<code>}}<nowiki>{{</nowiki>{{#if:{{{prefix|}}}|{{{prefix}}}:}}[[Template:{{{1}}}|{{{1}}}]]<!--
+
{{#if:{{{style|}}}|<code>}}<nowiki>{{</nowiki><span style="padding:0 0.1em;">{{#if:{{{prefix|}}}|{{{prefix}}}:&nbsp;}}[[{{#ifeq:{{#sub:{{{1}}}|0|1}}| : ||{{#if:{{NAMESPACE:{{{1}}}}}||{{ns:10}}}}}}:{{{1}}}|{{#ifeq:{{#sub:{{{1}}}|0|1}}| : | : }}{{#ifeq:{{NAMESPACE:{{{1}}}}}|{{ns:10}}|{{PAGENAME:{{{1}}}}}|{{{1}}}}}]]</span>{{#if:{{{2|}}}
-->{{#if:{{{2|}}}|&#124;<span style="color:gray;">''{{{2}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{2}}}</var> }}{{ #if: {{{3|}}}
-->{{#if:{{{3|}}}|&#124;<span style="color:gray;">''{{{3}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{3}}}</var> }}{{ #if: {{{4|}}}
-->{{#if:{{{4|}}}|&#124;<span style="color:gray;">''{{{4}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{4}}}</var> }}{{ #if: {{{5|}}}
-->{{#if:{{{5|}}}|&#124;<span style="color:gray;">''{{{5}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{5}}}</var> }}{{ #if: {{{6|}}}
-->{{#if:{{{6|}}}|&#124;<span style="color:gray;">''{{{6}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{6}}}</var> }}{{ #if: {{{7|}}}
-->{{#if:{{{7|}}}|&#124;<span style="color:gray;">''{{{7}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{7}}}</var> }}{{ #if: {{{8|}}}
-->{{#if:{{{8|}}}|&#124;<span style="color:gray;">''{{{8}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{8}}}</var> }}{{ #if: {{{9|}}}
-->{{#if:{{{9|}}}|&#124;<span style="color:gray;">''{{{9}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{9}}}</var> }}{{ #if: {{{10|}}}
-->{{#if:{{{10|}}}|&#124;<span style="color:gray;">''{{{10}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{10}}}</var> }}{{ #if: {{{11|}}}
-->{{#if:{{{11|}}}|&#124;<span style="color:gray;">''{{{11}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{11}}}</var> }}{{ #if: {{{12|}}}
-->{{#if:{{{12|}}}|&#124;<span style="color:gray;">''{{{12}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{12}}}</var> }}{{ #if: {{{13|}}}
-->{{#if:{{{13|}}}|&#124;<span style="color:gray;">''{{{13}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{13}}}</var> }}{{ #if: {{{14|}}}
-->{{#if:{{{14|}}}|&#124;<span style="color:gray;">''{{{14}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{14}}}</var> }}{{ #if: {{{15|}}}
-->{{#if:{{{15|}}}|&#124;<span style="color:gray;">''{{{15}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{15}}}</var> }}{{ #if: {{{16|}}}
-->{{#if:{{{16|}}}|&#124;<span style="color:gray;">''{{{16}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{16}}}</var> }}{{ #if: {{{17|}}}
-->{{#if:{{{17|}}}|&#124;<span style="color:gray;">''{{{17}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{17}}}</var> }}{{ #if: {{{18|}}}
-->{{#if:{{{18|}}}|&#124;<span style="color:gray;">''{{{18}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{18}}}</var> }}{{ #if: {{{19|}}}
-->{{#if:{{{19|}}}|&#124;<span style="color:gray;">''{{{19}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{19}}}</var> }}{{ #if: {{{20|}}}
-->{{#if:{{{20|}}}|&#124;<span style="color:gray;">''{{{20}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{20}}}</var> }}{{ #if: {{{21|}}}
-->{{#if:{{{21|}}}|&#124;<span style="color:gray;">''{{{21}}}''</span>}}<!--
+
| &#124;<var style="padding: 0 0.2em; color: gray;">{{{21}}}</var> }}<nowiki>}}</nowiki>{{ #if: {{{style|}}} | </code> }}<noinclude>{{documentation}}</noinclude>
--><nowiki>}}</nowiki>{{#if:{{{style|}}}|</code>}}<noinclude>
 
{{documentation}}</noinclude>
 

Revision as of 05:24, 7 December 2019

{{[[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.
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=prefix|style=code|block=block}}
Line breaks (<br/>) can be useful for for adding three dots to seperate content ( ... ). An example is listed below
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}}
{{t|welcome|2=Item1|3=Item2|4=Item3<br/>...|block=true}} gives...
{{welcome|Item1|Item2|Item3
...
}}
Full usage
{{t|welcome|2=param1=Item1|3=param2=Item2|4=param3=Item3<br/>...|5=param10=Item10|block=true|style=code|prefix=subst}} gives...
{{subst: welcome|param1=Item1|param2=Item2|param3=Item3
...
|param10=Item10}}
See also
{{t2}}
{{s}}