Template:Tl
{{[[Template:{{{1}}}|{{{1}}}]]}}
<templatestyles src="Module:Documentation/styles.css"></templatestyles>
![]() | This template is used on approximately 4,820,000 pages, or roughly 2675% of all pages. To avoid major disruption and server load, any changes should be tested in the template's /sandbox or /testcases subpages, or in your own user subpage. The tested changes can be added to this page in a single edit. Consider discussing changes on the talk page before implementing them. Transclusion count updated automatically (see documentation). |
![]() | This template is used in system messages. Changes to it can cause immediate changes to the Wikipedia user interface. To avoid large-scale disruption, any changes should first be tested in this template's /sandbox or /testcases subpage, or in your own user space. The tested changes can then be added in one single edit to this template. Please discuss any changes on the talk page before implementing them. |
The template link template is a simple macro template used to display a template name as a link surrounded by braces, thus showing the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it. Note that this template may be used under the name "tee-el" (tl) as well as "tee-one" (t1)— both function the same way and produce the same results (this is not true for all such visually confusing templates containing a possible 1/l mix-up: {{Tla}} and {{T1a}} are not interchangeable). A short example of its use is:
{{tl|Example}}
- which generates
- {{Example}}
Contents
TemplateData
TemplateData for Tl
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.
Examples
Code | Result | Notes |
---|---|---|
{{tl|Void}}
|
{{Void}} | Standard usage |
{{tls|Example}}
|
{{subst:Example}} | For templates that should be substituted |
{{tl2|X1}}
|
{{X1}}
|
This formats the link to show how it would look in code (i.e., monospace font) |
{{tl2|sister=M:|3x}}
|
{{3x}}
|
Same as above, for templates on another Wikimedia project (in this example, 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
<templatestyles src="Module:Navbar/styles.css"></templatestyles>General-purpose formatting
Link style → | Linked | Unlinked | Linked with subst | Linked including braces | Linked with alternative text | |
---|---|---|---|---|---|---|
Text style ↓ | ↓ Script error: No such module "Template link general". options1 → | DEFAULT | <syntaxhighlight lang="text" class="" id="" style="" inline="1">nolink=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">subst=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">braceinside=yes</syntaxhighlight> | <syntaxhighlight lang="text" class="" id="" style="" inline="1">alttext=Foo</syntaxhighlight> <syntaxhighlight lang="text" class="" id="" style="" inline="1">2=Foo</syntaxhighlight> |
normal | DEFAULT | Script error: No such module "Template link general".1 Script error: No such module "Template link general". Script error: No such module "Template link general".2 Script error: No such module "Template link general".3 |
Script error: No such module "Template link general".2 | Script error: No such module "Template link general". Script error: No such module "Template link general". Script error: No such module "Template link general".3 |
Script error: No such module "Template link general". | Script error: No such module "Template link general". |
code
|
<syntaxhighlight lang="text" class="" id="" style="" inline="1">code=yes</syntaxhighlight> | Script error: No such module "Template link general". Script error: No such module "Template link general". Script error: No such module "Template link general".3 |
Script error: No such module "Template link general".2 Script error: No such module "Template link general".2 Script error: No such module "Template link general". |
Script error: No such module "Template link general". | N/A | |
monospace kbd |
<syntaxhighlight lang="text" class="" id="" style="" inline="1">plaincode=yes</syntaxhighlight>4 <syntaxhighlight lang="text" class="" id="" style="" inline="1">kbd=yes</syntaxhighlight>5 |
Script error: No such module "Template link general".5 Script error: No such module "Template link general".5 |
N/A | Script error: No such module "Template link general".5 Script error: No such module "Template link general".5 Script error: No such module "Template link general".6 | ||
bold | <syntaxhighlight lang="text" class="" id="" style="" inline="1">bold=yes</syntaxhighlight> | Script error: No such module "Template link general". | N/A | |||
bold+code
|
code=yes</syntaxhighlight> | Script error: No such module "Template link general". | ||||
italic+code
|
code=yes</syntaxhighlight> | Script error: No such module "Template link general". | ||||
|
Other formatting templates
Code example | Effect | Notes |
---|---|---|
Script error: No such module "Template link general". | {{hatnote}} |
Supports linking to sister projects (e.g., fr:Hatnote) |
Script error: No such module "Template link general". | {{User:Ahunt/SSHFS}} | Supports linking to any namespace |
Script error: No such module "Template link general". | {{hatnote|lang=fr|Some text}} |
Shows code and example |
Script error: No such module "Template link general". | "{{hatnote|Some hatnote text}}" gives " " [1] |
Shows code, example and a link to expand the template code |
Script error: No such module "Template link general". | Template:Hatnote | Produces a normal link to the template |
Script error: No such module "Template link general". Script error: No such module "Template link general". |
[[Template:Hatnote]] [[Template:Hatnote|Hatnote]] |
Formats wikilink, with optional piped link text and blended suffix |
Script error: No such module "Template link general". | {{#invoke:Bananas|hello}} | Counterpart to {{tl}} for linking to Lua modules |
Script error: No such module "Template link general". | {{#invoke:Bananas|hello}} |
Counterpart to {{tlx}} for linking to Lua modules |
Script error: No such module "Template link general". | |title=book title |
Formats template parameters for display, with or without values |
Script error: No such module "Template link general". | [[WP:LASTING]] |
Takes a shortcut suffix in project namespace and displays it with brackets and the WP: alias in a <code>...</code> tag.
|
Script error: No such module "Template link general". Script error: No such module "Template link general". |
<ref>...</ref> <templatedata> |
Formats [X]HTML tags; can add content, choose opening, closing, or self-closing |
Script error: No such module "Template link general". | {{d:Ping project}} | Wikidata counterpart to {{tl}} |
With utility links
Code example | Effect |
---|---|
Script error: No such module "Template link general". | Template:Hatnote (edit | talk | history | links | watch | logs) |
Script error: No such module "Template link general". | Template:Hatnote(edit talk links history) |
Script error: No such module "Template link general". | Hatnote (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test) |
Script error: No such module "Template link general". | Template:Hatnote (edit · talk · history · links · transclusions · logs · subpages · delete) |
Script error: No such module "Template link general". | Template:hatnote (backlinks edit) |
Script error: No such module "Template link general". | {{Hatnote}} |
Script error: No such module "Template link general". | {{Hatnote}} |
Script error: No such module "Template link general". | {{subst:Hatnote}} |
Script error: No such module "Template link general". | Template:Hatnote (talk⧼dot-separator⧽links⧼dot-separator⧽edit) |
Script error: No such module "Template link general". | Template:Hatnote (talk links edit) |
Script error: No such module "Template link general". | Template:Hatnote (backlinks edit) |
Script error: No such module "Template link general". | {{Hatnote}} (talk) |
Script error: No such module "Template link general". | Template:Error{{Hatnote}} (t/l) |
Script error: No such module "Template link general". | Template:Hatnote (links, talk) |