Template:T/doc: Difference between revisions
More actions
m fix| |
m namespace |
||
| Line 12: | Line 12: | ||
|3def= | |3def= | ||
|3stat=optional- | |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<!-- ,  like {{Tl|Tl|Tl}} --> | *0: none of the brackets are part of the link<!-- ,  like {{Tl|Tl|Tl}} --> | ||
*1: the inner brackets are part of the link <!--  like {{T1|T1}} --> | *1: the inner brackets are part of the link <!--  like {{T1|T1}} --> | ||
| Line 24: | Line 32: | ||
*8: without surrounding brackets | *8: without surrounding brackets | ||
*9: like <code>i=8</code> but with the name typewritten | *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  (like {{T|Tl2}})<br> | ||
With <code>code=tt</code> also the surrounding brackets are typewritten | With <code>code=tt</code> also the surrounding brackets are typewritten | ||
|6def= | |6def= | ||
|6stat=optional- | |6stat=optional- | ||
|7=parm | |||
|7d=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 appearing and easier to format explanatory, use {{T|Tle}} | |||
|7def= | |||
|7stat=optional- | |||
|name={{BASEPAGENAME}} | |name={{BASEPAGENAME}} | ||
| Line 51: | Line 59: | ||
|type= | |type= | ||
|i18n-method=- | |i18n-method=- | ||
|i18n-desc=The template does not generate any localizable text. With + or - always the namespace (in English) is used. | |||
|example= | |example= | ||
|example-value= | |example-value= | ||
| Line 60: | Line 69: | ||
|mustbesubst= | |mustbesubst= | ||
}} | }} | ||
---- | |||
__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> | <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> | ||
| Line 116: | Line 127: | ||
*<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|color titling|en|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |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>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de|code=y}} | *<nowiki>{{</nowiki>{{BASEPAGENAME}}<nowiki>|Coltit|3=de|code=y}}</nowiki> → {{ {{BASEPAGENAME}} |Coltit|3=de|code=y}} | ||
{{#switch:{{BASEPAGENAME}}|T0=with <tt>namespace</tt> | |||
*{{Tle|T=T0|Tle|-}} → {{T0|Tle|-}} | |||
*{{Tle|T=T0|Tle|+}} → {{T0|Tle|+}} | |||
}} | |||
{{Commons:Link templates/Template links}} | {{Commons:Link templates/Template links}} | ||
Revision as of 08:02, 9 January 2018
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 (any namespace is ignored) | T | optional | |
2 | display name (displayed as specified) | parameter 1 | optional | |
3 | interwiki language code (can also be specified with lang=) | empty | optional | |
4 | 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: all namespaces
The template is intended to be used by the following user groups: all users
Localization
This template is not intended to be localized.
The template does not generate any localizable text. With + or - always the namespace (in English) is used.
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
- {{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}}