Template:Tl
| This template has been protected from editing to prevent vandalism. Please discuss changes on the talk page or request unprotection. |
The {{T}} template creates a formatted link to a Template.
The Tl template creates a formatted link to a template with a monospace font and surrounds it with 2 brace pairs which are excluded from the link label.
Usage
{{Tl |1= }}
Template parameters
| Parameter | Description | Default | Status | |
|---|---|---|---|---|
1 | template name (any namespace is ignored) | Tl | optional | |
2 | display name (displayed as-it-is) | parameter 1 | optional | |
3lang | interwiki language code (ISO 639), if the template is in another Wikipedia can also be specified with lang= | empty | optional | |
4 | +/- to precede the template name with the namespace Template:
(when both signs are specified, "+" has precedence). | empty | optional | |
incli | i or incl is a one-digit formatting option:
| 3 | optional | |
code | any value, for a surrounding <code> tag (like {{Tl2}}).With code=tt also the surrounding brackets are in teletype style. | empty | optional | |
link | returns plain text instead of a link when set to link=no | empty | optional | |
case | for formatting of the namespace prefix:
| empty | optional | |
i18n | another language than {{int:lang}} for namespace translation (when case=i or case=n) | en | optional | |
parm | to display templates parameters (like {{Tlx}}) Usage e.g.
| empty | optional | |
full | expanded display: Template:{{Example}} (like {{Lts}}) request this expansion with either full=5 or 5=full. | 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: "Template" is displayed;
only in combination with case=i or case=n the namespace can be translated using the {{LangSwitch}} construct (according to i18n).
[ subpage]
Note: The templates T, T0, T1, T2, Tl, T9 use the same main template 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 | 3 | {{Tl}} |
| T9 | 9 | T9 |
| This means that each of them can be converted into each one of the others by just replacing that parameter: | |||
| T | {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|2}}}}}}|code={{{code|}}}}} | {{Tl}} | |
| T0 | {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|8}}}}}}|code={{{code|}}}}} | Tl | |
| T1 | {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|1}}}}}}|code={{{code|}}}}} | {{Tl}} | |
| T2 | {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|0}}}}}}|code={{{code|}}}}} | {{Tl}} | |
Tl |
{{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|3}}}}}}|code={{{code|}}}}}}} | {{Tl}} | |
| T9 | {{Tl|1={{{1|}}}|2={{{2|}}}|3={{{3|{{{lang|}}}}}}|i={{{i|{{{incl|9}}}}}}|code={{{code|}}}}} | Tl | |
Examples
- {{Tl|information}} → {{Information}}
- {{Tl}} → {{Tl}}
- {{Tl|coltit}} → {{Coltit}}
- {{Tl|Coltit|incl=0}} → {{Coltit}}
- {{Tl|Coltit|incl=1}} → {{Coltit}}
- {{Tl|Coltit|incl=2}} → {{Coltit}}
- {{Tl|Coltit|incl=3}} → {{Coltit}}
- {{Tl|Coltit|incl=4}} → {{Coltit}}
- {{Tl|Coltit|incl=5}} → {{Coltit}}
- {{Tl|Coltit|incl=6}} → {{Coltit}}
- {{Tl|Coltit|incl=8}} → Coltit
- {{Tl|Coltit|incl=9}} → Coltit
- {{Tl|Coltit|coltit}} → {{coltit}}
- {{Tl|Coltit|test|it}} → {{test}}
- {{Tl|Coltit|3=de}} → {{Coltit}}
- {{Tl|{U|parm=user name}} → {{U|user name}}
- {{Tl|U|parm=1=user name}} → {{U|1=user name}}
with code=y
- {{Tl|user|code=y|parm=|1=|2=|parameter=}} → {{
User|1=|2=|parameter=}} - {{Tl|user|code=y|parm=1=|2=|parameter=}} → {{
User|1=|2=|parameter=}} no pipe - {{Tl|coltit|code=y}} → {{
Coltit}} - {{Tl|Coltit|coltit|code=y}} → {{
coltit}} - {{Tl|Coltit|color titling|en|code=y}} → {{
color titling}} - {{Tl|Coltit|3=de|code=y}} → {{
Coltit}}
The parameter case (with the other parameters supporting it) intends to be rarely used, but when in a textual environment a special appearance is desired, with the namespace prefix in different formats, the following concealed tables shows the possibilities. All combinations are possible but not every one is useful.
| Table: different displays for {{Tl}} with the namespace option | |
|---|---|
| {{ Tl | example }} this is the standard | {{Example}} |
| {{ Tl | example | - }} | Template:{{Example}} |
| {{ Tl | example | - | case = l }} | template:{{Example}} |
| {{ Tl | example | - | case = i }} | LangSwitch Error: no default:{{Example}} |
| {{ Tl | example | - | case = n }} | template:{{Example}} |
| {{ Tl | Example | + }} | Template:{{Example}} |
| {{ Tl | example | + | case = l }} | template:{{Example}} |
| {{ Tl | example | + | case = i }} | template:{{Example}} |
| {{ Tl | example | + | case = n }} | template:{{Example}} |
| {{ Tl | Example | link = n }} | {{Example}} |
| {{ Tl | Example | - | link = n }} | Template:{{Example}} |
| {{ Tl | example | - | link = n | case = l }} | template:{{Example}} |
| {{ Tl | example | - | link = n | case = i }} | LangSwitch Error: no default:{{Example}} |
| {{ Tl | example | - | link = n | case = n }} | template:{{Example}} |
| {{ Tl | example | + | link = n }} | Template:{{Example}} |
| {{ Tl | example | + | link = n | case = l }} | template:{{Example}} |
| {{ Tl | example | + | link = n | case = i }} | LangSwitch Error: no default:{{Example}} |
| {{ Tl | example | + | link = n | case = n }} | template:{{Example}} |
| Large table with displays for {{Tl}} with the namespace option | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| link | ns | case | i= | i=0 | i=1 | i=2 | i=3 |
i=4 | i=5 | i=6 | i=8 | i=9 |
| Tl | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | Tl | Tl | |||
| + | Template:Tl | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:Tl | Template:Tl | ||
| + | l | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl | |
| + | i | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl | |
| + | n | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl | |
| - | Template:Tl | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:Tl | Template:Tl | ||
| - | l | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl | |
| - | i | LangSwitch Error: no default:Tl | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:Tl | LangSwitch Error: no default:Tl | |
| - | n | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl | |
| no | Tl | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | {{Tl}} | Tl | Tl | ||
| no | + | Template:Tl | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:Tl | Template:Tl | |
| no | + | l | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl |
| no | + | i | LangSwitch Error: no default:Tl | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:Tl | LangSwitch Error: no default:Tl |
| no | + | n | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl |
| no | - | Template:Tl | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:{{Tl}} | Template:Tl | Template:Tl | |
| no | - | l | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl |
| no | - | i | LangSwitch Error: no default:Tl | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:{{Tl}} | LangSwitch Error: no default:Tl | LangSwitch Error: no default:Tl |
| no | - | n | template:Tl | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:{{Tl}} | template:Tl | template:Tl |
[ subpage]
Template links
| Code | Result | Notes | lock |
|---|---|---|---|
|
{{T|example}} |
{{Example}} | makes brackets part of the link | |
|
{{T0|example}} |
Example | just link, without the brackets | |
|
{{T1|example}} |
{{Example}} | inner brackets are part of the link | |
|
{{T2|example}} |
{{Example}} | brackets are not a part of the link | |
|
{{Tl|example}} |
{{Example}} | makes brackets around the link | |
|
{{Tlr|User:Example}} |
{{User:Example}} | like {{tl}} but for any namespace | |
|
{{Tls|example}} |
{{subst:example}} | no parameters, adds "subst:" | |
| Templates showing parameters Meta template {{Tle}} is easiest to parametrize. | |||
|
{{Tle|T=F|p1=1|v1|p2=2|v2|p3=3|v3}} |
{{ F | 1 = v1 | 2 = v2 | 3 = v3 }} |
describes template parameters by names and values | |
|
{{Tlx|example|1|2|3|4|5||7|8|9}} |
{{example|1|2|3|4|5|7|8|...}} | up to 8 parameters | |
|
{{Tlf|example|1|2|3|...up to 8}} |
{{example|1|2|3|...up to 8}} | up to 8 parameters, no link | |
|
{{Tlc|example|1|2|3|4|||7|up to 8|9 is ignored.}} |
{{example|1|2|3|4|||7|up to 8}} |
up to 8 parameters, no link, <code> style |
|
|
{{Tld|example|1|2||3||}} |
{{example|1||2|3||}} | up to 8 parameters, <code> style[clarification needed] |
|
|
{{Tlsu|User:Example}} |
{{subst:User:Example}} | like {{Tls}}, but supporting parameters | |
| Alternative forms These ignore empty parameters. | |||
|
{{Tlp|example|1|2|3|4|5||7|8|9 is ignored.}} |
{{example|1|2|3|4|5|7|8}} | up to 8 parameters; ignores empty parms | |
|
{{Tl2|example|p1|p2}} |
{{example|p1|p2}} |
up to 2 parameters, <code> style |
|
|
{{Tlsp|example|1|2|3|4|5|6|7|8|9}} |
{{subst:example|1|2|3|4|5|6|7|8|...}} | up to 8 parameters, adds linked "subst:" | |
|
{{Tlsx|example|1|2|3|4|5|6 and above are ignored.|7}} |
{{subst:example|1|2|3|4|5|...}} |
up to 5 parameters, adds linked "subst:", <code> style |
|
General-purpose formatting
| Text style ↓ | {{tlg}} options[note 1] to achieve text style |
Link style | ||||
|---|---|---|---|---|---|---|
| Linked | Unlinked | Linked with subst | Unlinked with subst | Linked including braces | ||
| {{tlg}} options[note 1] to achieve link style |
N/A | DEFAULT | nolink=yes
|
subst=yes
|
nolink=yes
|
braceinside=yes
|
| normal | DEFAULT |
|
|
N/A | ||
code
|
code=yes
|
|
|
N/A | ||
| monospace | mono=yes |
N/A | N/A | |||
plaincode
|
plaincode=yes | |||||
| kbd[clarification needed] | kbd=yes | |||||
- ↑ a b c
{{tlg}}is the most general template, allowing any combination of text style and/or link style options. - ↑ a b c d e Prevents wrapping of text by placing it inside
<span class="nowrap">...</span>tags. - ↑ a b c Allows links to templates in any namespace.
- ↑ a b c d Displays monospaced font using
<span style="font-family: monospace;">...</span>. - ↑
{{tlg|plaincode=yes}}uses<code style="border: none; background-color: transparent;">...</code>. - ↑
{{tlg|kbd=yes}}uses<kbd>...</kbd>.