ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tl
The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation. A short example is:
{{Tl|Example}}
- which generates
{{Example}}
TemplateData
ð¹ðœðŒð°ð¹ð³ðŽð¹This template displays a template name as a link surrounded by braces, thus showing how the template name would be used in code. Its primary use is in instruction and documentation.
Parameter | Description | Type | Status | |
---|---|---|---|---|
template name | 1 | the template name without the namespace prefix âTemplate:â, which is added automatically | Line | required |
More complex variations are described below.
Example
ð¹ðœðŒð°ð¹ð³ðŽð¹Code | Result | Notes |
---|---|---|
{{Tl|Void}}
|
{{Void}} | Standard usage |
{{Tls|Void}}
|
{{subst:Example}} | For templates that should be substituted |
{{Tl2|X1}}
|
{{X1}}
|
This formats the link to show how it would look in code |
{{Tl2|SISTER=m:|3x}}
|
{{3x}}
|
Same as above, for templates on another Wikimedia project (such as meta) |
{{Tl2|SISTER=wikibooks|LANG=de:|WP}}
|
{{WP}}
|
For templates on another language project |
{{Tl|1==}}
|
{{=}}
|
Use the format {{Tl|1=templatename}} if the template contains template coding characters such as {{=}} or {{!}}
|
See also
ð¹ðœðŒð°ð¹ð³ðŽð¹ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Navbar
General-purpose formatting
ð¹ðœðŒð°ð¹ð³ðŽð¹Link style â | Linked | Unlinked | Linked with subst | Linked including braces | Linked with alternative text | |
---|---|---|---|---|---|---|
Text style â | â {{tlg}} options1 â
|
N/A | nolink=yes
|
subst=yes
|
braceinside=yes
|
alttext=Foo 2=Foo
|
Normal | N/A | {{Tlg}} 1, 2{{Tl}} {{Tlp}} 2{{Tlu}} 4
|
{{Tlf}} 2
|
{{Tls}} {{Tlsp}}
|
{{Tn}}
|
{{Tla}}
|
Code
|
code=yes ortt=yes
|
{{Tlx}} {{Tltt}} {{Tltt2}}
|
{{Tlc}} 2{{Tld}} 2{{Tnull}}
|
{{Tlxs}} {{Tltts}} {{Tltts3}} {{Tltss}} 3
|
N/A | |
Bold | bold=yes
|
{{Tlb}}
|
N/A | |||
Bold code
|
bold=yes|code=yes
|
{{Tlxb}}
| ||||
Italic code
|
italic=yes|code=yes
|
{{Tlxi}}
|
- 1
{{Tlg}}
is the most general, allowing any combination of text style and/or link style options. - 2 Prevents wrapping of text by placing it inside
<span class="nowrap">...</span>
tags. - 3 Uses monospace font but not
<code>...</code>
. - 4 Allows links to templates in any namespace.
Other formatting templates
ð¹ðœðŒð°ð¹ð³ðŽð¹Code example | Effect | Notes |
---|---|---|
{{Tl2|Hatnote|lang=fr}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tl2 | Supports linking to sister projects (e.g., fr:Hatnote) |
{{Tlu|User:Ahunt/SSHFS}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tlu | Supports linking to any namespace |
{{Xpd|Hatnote|Some hatnote text}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Xpd | Shows code, example and a link to expand the template code |
{{Para|title|<var>book title</var>}} |
|title=book title |
Formats template parameters for display, with or without values |
With utility links
ð¹ðœðŒð°ð¹ð³ðŽð¹Code example | Effect |
---|---|
{{Lts|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Lts |
{{T links|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:T links |
{{Tfd links|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tfd links |
{{Tiw|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tiw |
{{Tltt|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tltt |
{{Tetl|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tetl |
{{Tsetl|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tsetl |
{{Ti|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Ti |
{{Tic|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tic |
{{Tiw|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tiw |
{{Tlt|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Tlt |
{{Ttl|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Ttl |
{{Twlh|Hatnote}} |
ðð°ð¿ðð°ðŒðŽð»ðŽð¹ðœð:Twlh |