Template:T/doc: Difference between revisions
Template page
More actions
m format |
m format |
||
| Line 34: | Line 34: | ||
|6=parm | |6=parm | ||
|6d=to display templates parameters   (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&#124;1=&#124;2=&#124;code=y</nowiki></code>"gives "<code><nowiki>|1=|2=|code=y</nowiki></code>"<br> | |6d=to display templates parameters   (like {{T|Tlx}}) <br> e.g."<code><nowiki>parm=&#124;1=&#124;2=&#124;code=y</nowiki></code>"gives "<code><nowiki>|1=|2=|code=y</nowiki></code>"<br> | ||
::For a better and easier formatting use {{T|Tle}} | ::For a better and easier formatting explanatory, use {{T|Tle}} | ||
|6def= | |6def= | ||
|6stat=optional- | |6stat=optional- | ||
|name={{BASEPAGENAME}} | |name={{BASEPAGENAME}} | ||
|desc='''{{BASEPAGENAME}}''' links to a '''T'''emplate. It creates a | |desc='''{{BASEPAGENAME}}''' links to a '''T'''emplate. It creates a formatted link to a template{{#switch:{{BASEPAGENAME}} | ||
{{#switch:{{BASEPAGENAME}} | |T= and surrounds it with <code>{{</code>...<code>}}</code> making the brackets a part of the link | ||
|T=and surrounds it with <code>{{</code>...<code>}}</code> making the brackets a part of the link | |||
|T0= | |T0= | ||
|T1=and surrounds it with two brackets making the inner bracket a part of the link | |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 | |T2= and surrounds it with two brackets making the them a part of the link | ||
|Tl= | |Tl=}}. | ||
|namespace= | |namespace= | ||
|usergroup= | |usergroup= | ||
| Line 67: | Line 65: | ||
! Template !! value | ! Template !! value | ||
|- | |- | ||
|T || 2 | |{{T0|T}} || 2 | ||
|- | |- | ||
|T0 || 8 | |{{T0|T0}} || 8 | ||
|- | |- | ||
|T1 || 1 | |{{T0|T1}} || 1 | ||
|- | |- | ||
|T2 || 0 | |{{T0|T2}} || 0 | ||
|- | |- | ||
|Tl|| 2 | |{{T0|Tl}} || 2 | ||
|} | |} | ||
<small>(Because the templates T and Tl are editprotected currently only T0 | <small>(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.)</small><br> | ||
== Examples == | == Examples == | ||
Revision as of 11:11, 3 August 2016
T links to a Template. It creates a formatted link to a template and surrounds it with {{...}} making the brackets a part of the link.
Usage
{{T |1= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | template name | T | optional | |
2 | display name | parameter 1 | optional | |
3 | interwiki language code (can also be specified with lang=) | empty | optional | |
incli | numeric value,
| 2 | optional | |
code | any value, for a sourrounding <code> tag (like {{Tl2}})With code=tt also the surrounding brackets are typewritten | empty | optional | |
parm | to display templates parameters (like {{Tlx}}) e.g." parm=|1=|2=|code=y"gives "|1=|2=|code=y"
| empty | optional | |
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 both editprotected currently only T0 and T1 are maintained; the examples below may not work well with other templates.)
Examples
- {{T|information}} → {{Information}}
- {{T}} → {{T/doc}}
- {{T|coltit}} → {{Coltit}}
- {{T|Coltit|incl=0}} → {{Coltit}}
- {{T|Coltit|incl=1}} → {{Coltit}}
- {{T|Coltit|incl=2}} → {{Coltit}}
- {{T|Coltit|incl=4}} → {{Coltit}}
- {{T|Coltit|incl=5}} → {{Coltit}}
- {{T|Coltit|incl=6}} → {{Coltit}}
- {{T|Coltit|incl=8}} → Coltit
- {{T|Coltit|incl=9}} → Coltit
- {{T|Coltit|coltit}} → {{coltit}}
- {{T|Coltit|test|en}} → {{test}}
- {{T|Coltit|3=de}} → {{Coltit}}
with code=y
- {{T|U|user|code=y|parm=|1=|2=|parameter=}} → {{
user|1=|2=|parameter=}} - {{T|coltit|code=y}} → {{
Coltit}} - {{T|Coltit|coltit|code=y|excl=y}} → {{
coltit}} - {{T|Coltit|color titling|en|code=y}} → {{
color titling}} - {{T|Coltit|3=de|code=y}} → {{
Coltit}}
{{Commons:Link templates/Template links}}