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 expansion
m expansion
Line 6: Line 6:
|2=2
|2=2
|2d=display name
|2d=display name
|2def=parameter 1
|2def=parameter 1
|2stat=
|2stat=optional-
|3=3
|3=3
|3d=interwiki language code (can also be specified with <code>lang=</code>)
|3d=interwiki language code (can also be specified with <code>lang=</code>)
|3def=
|3def=
|3stat=
|3stat=optional-
|4=code
 
|4d=any value, for a sourrounding <code><nowiki><code></nowiki></code> tag &ensp;(like {{T|Tl2}})
|4=incl
|4def=
|4aliases=i
|4stat=optional-
|4d=numeric value,
|5=incl
*0:  both brackets are not a part of the link, &ensp;like {{Tl|Tl|Tl}}
|5d=numeric value,
*0:  both brackets are not a part of the link, &ensp;like {{Tl|Tl}}
*1:  the inner brackets are part of the link  &ensp;like {{T1|T1}}
*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}}
*2:  both brackets are part of the link, &ensp;like {{T|T}}
|5def=2
*4:  like <code>i=0</code> but with the name typewritten
|5stat=optional-|6=parm
*5:  like <code>i=1</code> but with the name typewritten
|6d=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>"<br>gives "<code><nowiki>&#124;1=&#124;2=&#124;code=y</nowiki></code>"
*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
|4def={{#switch:{{BASEPAGENAME}}|T=2|T0=8|T1=1|T2=0|#default=?}}
|4stat=optional-
 
|5=code
|5d=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
|5def=
|5stat=optional-
|6=parm
|6d=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 and easier formatting use {{T|Tle}}
|6def=
|6def=
|6stat=optional-
|6stat=optional-
|desc='''T''' links to a '''T'''emplate. It creates a <!--simple pipe-trick won't work!--> link to a template and surrounds it with <code>{{</code>...<code>}}</code> making the brackets a part of the link.
 
|name={{BASEPAGENAME}}
|desc='''{{BASEPAGENAME}}''' links to a '''T'''emplate. It creates a <!--simple pipe-trick won't work!--> link to a template
{{#switch:{{BASEPAGENAME}}
|T=and surrounds it with <code>{{</code>...<code>}}</code> making the brackets a part of the link
|T0=
|T1=and surrounds it with two brackets making the inner bracket a part of the link
|T2=and surrounds it with two brackets making the them a part of the link
|Tl=
|#default=|}}.
|namespace=
|namespace=
|usergroup=
|usergroup=
Line 42: Line 62:
}}
}}
__NOTOC__
__NOTOC__
<u>Note:</u> The templates T, T0, T1, T2, Tl contain the same code with the only difference of the default value for the parameter <code>incl=</code>.<br>
{| class="wikitable" style="text-align:center"
! Template !! value
|-
|T || 2
|-
|T0 || 8
|-
|T1 || 1
|-
|T2 || 0
|-
|Tl|| 2
|}
<small>(Because the templates T and Tl are editprotected currently only T0 is maintained; the examples below may not work well with other templates.)</small><br>
== Examples ==
== Examples ==
* {{tlf|T|information}} → {{T|information}}
* {{tlf| {{BASEPAGENAME}} |information}} → {{ {{BASEPAGENAME}} |information}}


*<nowiki>{{T}}</nowiki> → {{T}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>}}</nowiki> → {{ {{BASEPAGENAME}} }}  
*<nowiki>{{T|coltit}}</nowiki> → {{T|coltit}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|coltit}}</nowiki> → {{ {{BASEPAGENAME}} |coltit}}
*<nowiki>{{T|Coltit|incl=0}}</nowiki> → {{T|Coltit|incl=0}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=0}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=0}}
*<nowiki>{{T|Coltit|incl=1}}</nowiki> → {{T|Coltit|incl=1}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=1}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=1}}
*<nowiki>{{T|Coltit|incl=2}}</nowiki> → {{T|Coltit|incl=2}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=2}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=2}}
*<nowiki>{{T|Coltit|coltit}}</nowiki> → {{T|Coltit|coltit}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=4}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=4}}
*<nowiki>{{T|Coltit|test|en}}</nowiki> → {{T|Coltit|test|en}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=5}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=5}}
*<nowiki>{{T|Coltit|3=de}}</nowiki> → {{T|Coltit|3=de}}<br>
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=6}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=6}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=8}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=8}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|incl=9}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|incl=9}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|coltit}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|coltit}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|test|en}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|test|en}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de}}<br>
with <code>code=y</code>
with <code>code=y</code>
*<nowiki>{{T|U|user|code=y|parm=&amp;#124;1=&amp;#124;2=&amp;#124;parameter=}}</nowiki> → {{T|U|user|code=y|parm=&#124;1=&#124;2=&#124;parameter=}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|U|user|code=y|parm=&amp;#124;1=&amp;#124;2=&amp;#124;parameter=}}</nowiki> → {{ {{BASEPAGENAME}} |U|user|code=y|parm=&#124;1=&#124;2=&#124;parameter=}}
*<nowiki>{{T|coltit|code=y}}</nowiki> → {{T|coltit|code=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|coltit|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |coltit|code=y}}
*<nowiki>{{T|Coltit|coltit|code=y|excl=y}}</nowiki> → {{T|Coltit|coltit|code=y|excl=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|coltit|code=y|excl=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|coltit|code=y|excl=y}}
*<nowiki>{{T|Coltit|color titling|en|code=y}}</nowiki> → {{T|Coltit|color titling|en|code=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|color titling|en|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|color titling|en|code=y}}
*<nowiki>{{T|Coltit|3=de|code=y}}</nowiki> → {{T|Coltit|3=de|code=y}}
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de|code=y}}





Revision as of 10:28, 3 August 2016

T links to a Template. It creates a link to a template and surrounds it with {{...}} making the brackets a part of the link.

Usage

{{T |1= }}

Template parameters

ParameterDescriptionDefaultStatus
1template nameToptional
2display nameparameter 1optional
3interwiki language code (can also be specified with lang=)emptyoptional
incl
i
numeric value,
  • 0: both brackets are not a part of the link,  like {{Tl}}
  • 1: the inner brackets are part of the link  like {{T1}}
  • 2: both brackets are part of the link,  like {{T}}
  • 4: like i=0 but with the name typewritten
  • 5: like i=1 but with the name typewritten
  • 6: like i=2 but with the name typewritten
  • 8: without surrounding brackets
  • 9: like i=8 but with the name typewritten
2optional
codeany value, for a sourrounding <code> tag  (like {{Tl2}})
With code=tt also the surrounding brackets are typewritten
emptyoptional
parmto display templates parameters   (like {{Tlx}})
e.g."parm=&#124;1=&#124;2=&#124;code=y"gives "|1=|2=|code=y"
For a better and easier formatting use {{Tle}}
emptyoptional

Additional information

The template is intended to be used in the following namespaces: no namespace specified

The template is intended to be used by the following user groups: no user group specified


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 value
T 2
T0 8
T1 1
T2 0
Tl 2

(Because the templates T and Tl are editprotected currently only T0 is 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.