Template:Template link
{{[[Template:{{{1}}}|{{{1}}}]]}}
Page Module:Documentation/styles.css has no content.
Script error: No such module "High-use". Template:Cascade-protected template 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 as they are not interchangeable.
Template:Tl works exactly like Template:Tl with the addition of optionally displaying alternative label text (link label). Template:Tl can include the use of parameters in the template (as {{{1}}}).
Examples
A short example of its use is:
- which generates
Other longer examples:
| Code | Result | Notes |
|---|---|---|
| Template:Tlx | Template:Tl | Standard usage |
| Template:Tlx | Template:Tls | For templates that should be substituted |
| Template:Tlx | Template:Tl2 | This formats the link to show how it would look in code (i.e., monospace font) |
| Template:Tlx | Template:Tl2 | Same as above, for templates on another Wikimedia project (in this example, Meta, using m:). See Interwiki codes.
|
| Template:Tlx | Template:Tl2 | For templates on another language project |
| Template:Tlx | Template:Tl | Use the format {{tl|1=templatename}} if the template contains template coding characters such as Template:Tl or Template:Tl
|
TemplateData
TemplateData for Template link
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 | Positional parameter: the template name without the namespace prefix “Template:”, which is added automatically | Template | required |
See also
- Template:Tiw
- Template:Tiw
- Template:Tiw to produce a [t]emplate [l]ink with a single [p]arameter
- Template:Tiw to produce a [t]emplate [l]ink with an e[x]panded number of parameters
- Template:Tiw to produce a [t]emplate [l]ink that's [s]ubst:ituted, with a single [p]arameter
- Template:Tiw
- Template:Tiw, tl or tlp in any namespace
- Template:Lcs
- Template:Tiw to produce a [t]emplate [l]ink to a template [r]edirect
Lua error in package.lua at line 80: module 'Module:Navbar/configuration' not found.
General-purpose formatting
| Text style ↓ | Script error: No such module "Template link general". optionsTemplate:NoteTag to achieve text style |
Link style | |||||
|---|---|---|---|---|---|---|---|
| Linked | Unlinked | Linked with subst | Unlinked with subst | Linked including braces | Linked with alternative text | ||
| Script error: No such module "Template link general". optionsTemplate:NoteTag to achieve link style |
Template:Screen reader-only | DEFAULT | nolink=yes
|
subst=yes
|
nolink=yes
|
braceinside=yes
|
alttext=Foo2=Foo
|
| normal | DEFAULT | Template:Tlg Template:Tl Template:Tlp Template:Tlu |
Template:Tlf <template link> |
Template:Tls Template:Tlsu |
Template:Tlsf <template link> |
Template:Tn | Template:Tla |
code
|
code=yes
|
Template:Tl2 Script error: No such module "Template link general". Template:Tlxu |
Template:Tlc <template link> Template:Tnull<template link> |
Template:Tlxs | Template:Tlsc <template link> |
Template:Screen reader-only | |
| monospace | plaincode=yes |
Template:Screen reader-only | Template:Tltss |
Template:Screen reader-only | |||
| kbd | kbd=yes | ||||||
| bold | bold=yes
|
Template:Tlb | Template:Screen reader-only | ||||
bold+code
|
bold=yes
|
Template:Tlxb | |||||
italic+code
|
italic=yes
|
Template:Tlxi | |||||
Other formatting templates
| Code example | Effect | Notes |
|---|---|---|
<syntaxhighlight lang="wikitext">
{{Hatnote
| Some text
| selfref = yes
| category = no
| lang = fr
}}
</syntaxhighlight>
|
{{Hatnote
| Some text
| selfref = yes
| category = no
| lang = fr
}}
|
Same as above |
|
{{Hatnote|Some text|selfref=yes|category=no|lang=fr}}
|
Same as above |
| Template:Tlx | Template:Tl2 | Supports linking to sister projects (e.g., fr:Hatnote) |
| Template:Tlx | {{hatnote|Some text}}
|
Shows code and example |
| Template:Tlx | Template:Tln | Produces a normal link to the template |
| Template:Tlx Template:Tlx |
Template:Elc Template:Elc |
Shows how wikilink would be entered in wiki markup, with optional link text and suffix |
| Template:Tlx | Template:Ml | Counterpart to Template:Tl for linking to Lua modules |
| Template:Tlx | Template:Mlx | Counterpart to Template:Tl for linking to Lua modules |
| Template:Tlx | Template:Ml-lua | Link to Lua modules and built-in libraries, showing Lua code. |
| Template:Tlx | |title=book title |
Formats template parameters for display, with or without values |
| Template:Tlx | Template:Sclx | Takes a shortcut suffix in project namespace and displays it with brackets and the WP: alias in a <code>...</code> tag.
|
| Template:Tlx Template:Tlx |
<ref>...</ref><templatedata> |
Formats [X]HTML tags; can add content, choose opening, closing, or self-closing |
| Template:Tlx | Template:Dtl | Wikidata counterpart to Template:Tl |
| Template:Tlx Template:Tlx |
Template:Mwl Template:Mwl |
Magic word links |
| Template:Tlx Template:Tlx |
Template:Pf Template:Pf |
Parser function equivalent to Template:Tl |
With utility links
| Code example | Effect |
|---|---|
| Template:Tlx | Template:Lt |
| Template:Tlx | Template:Lts |
| Template:Tlx | {{Hatnote}} (edit talk history links # /subpages /doc /doc edit /sbox /sbox diff /test) |
| Template:Tlx | Script error: No such module "Tfd links". |
| Template:Tlx | {{Hatnote}} |
| Template:Tlx | {{subst:Hatnote}} |
| Template:Tlx | Template:Ti |
| Template:Tlx | Template:Tic |
| Template:Tlx | Template:Tiw |
| Template:Tlx | Template:Tlt |
| Template:Tlx | Template:Hatnote (links, talk) |
| Template:Tlx | Template:Twlh |