Jump to content
Toggle menu
  • 8 articles
  • 75 files
  • 7 users
  • 37.8K edits
Neodyland Wiki
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Template:T/doc: Difference between revisions

Template page
m format
m test
Line 1: Line 1:
{{TemplateBox
{{#switch:{{BASEPAGENAME}}|T0=|{{TemplateBox
|1=1
|1=1
|1d=template name (any namespace is ignored)
|1d=template name (any namespace is ignored)
Line 40: Line 40:
|6def=
|6def=
|6stat=optional-
|6stat=optional-
|7=parm
|8=parm
|7d=to display templates parameters &ensp; (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&amp;#124;1=&amp;#124;2=&amp;#124;code=y</nowiki></code>"gives "<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>"<br>
|8d=to display templates parameters &ensp; (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&amp;#124;1=&amp;#124;2=&amp;#124;code=y</nowiki></code>"gives "<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>"<br>
:For a better appearing and easier to format explanatory, use {{T|Tle}}
:For a better appearing and easier to format explanatory, use {{T|Tle}}
|7def=
|8def=
|8stat=optional-
}}
 
<!--    -->
 
{{#switch:{{BASEPAGENAME}}|T0={{TemplateBox
|1=1
|1d=template name (any namespace is ignored)
|1def=[[Template:{{BASEPAGENAME}}|{{BASEPAGENAME}}]]
|1stat=
|2=2
|2d=display name (displayed as specified)
|2def=parameter&nbsp;1
|2stat=optional-
|3=3
|3d=interwiki language code (can also be specified with <code>lang=</code>)
|3def=
|3stat=optional-
|4=4
|4d={{#switch:{{BASEPAGENAME}}|T0=+/-  to precede the category name with the namespace <code>Category:</code>
:'''+''' ("plus" sign)  to make <tt>Category:</tt> a part of the link,
:'''-''' ("minus" sign) to precede <tt>Category:</tt> as a plain text.<br>
The +/- parameter can as well be specified with parameter 2 or 3<br>
(If ''both'' signs are specified, "+" has precedence).}}
|4def=
|4stat=optional-
 
|5=incl
|5aliases=i
|5d=numeric value,
*0:  none of the brackets are part of the link<!-- , &ensp;like {{Tl|Tl|Tl}} -->
*1:  the inner brackets are part of the link  <!-- &ensp;like {{T1|T1}} -->
*2:  both brackets are part of the link<!-- , &ensp;like {{T|T}} -->
*4:  like <code>i=0</code> but with the name typewritten
*5:  like <code>i=1</code> but with the name typewritten
*6:  like <code>i=2</code> but with the name typewritten
*8:  without surrounding brackets
*9:  like <code>i=8</code> but with the name typewritten
|5def={{#switch:{{BASEPAGENAME}}|T=2|T0=8|T1=1|T2=0|#default=?}}
|5stat=optional-
 
|6=code
|6d=any value, for a sourrounding <code><nowiki><code></nowiki></code> tag &ensp;(like {{T|Tl2}})<br>
With <code>code=tt</code> also the surrounding brackets are typewritten
|6def=
|6stat=optional-
|8=parm
|8d=to display templates parameters &ensp; (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&amp;#124;1=&amp;#124;2=&amp;#124;code=y</nowiki></code>"gives "<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>"<br>
:For a better appearing and easier to format explanatory, use {{T|Tle}}
|8def=
|8stat=optional-
 
|7=- or +}}
|7d=namespace
|7stat=optional-
|7stat=optional-
}}


|name={{BASEPAGENAME}}
|name={{BASEPAGENAME}}

Revision as of 10:44, 7 March 2018



Note: The templates T, T0, T1, T2, Tl contain the same code with the only difference of the default value for the parameter incl=.

Template i appearance
T 2 {{T}}
T0 8 T0
T1 1 {{T1}}
T2 0 {{T2}}
Tl 2 {{Tl}}

This means that each of them can be converted into each one of the others by just replacing that parameter:

T {{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}} {{T/doc}}
T0 {{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|8}}}}}}|code={{{code|}}}}} T/doc
T1 {{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|1}}}}}}|code={{{code|}}}}} {{T/doc}}
T2 {{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|0}}}}}}|code={{{code|}}}}} {{T/doc}}
Tl <tt>{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}</tt> {{T/doc}}
Tl {{#tag:tt|{{T|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}}}} {{T/doc}}

(Because the templates T and Tl are both editprotected currently only T0 and T1 are maintained; the examples below may not work well with other templates.)

Examples

with code=y

{{Commons:Link templates/Template links}}


Cookies help us deliver our services. By using our services, you agree to our use of cookies.