Template:Tl2/doc: Difference between revisions
Jump to navigation
Jump to search
Reverted 2 edits by 114.122.15.84 (talk): Unhelpful. That's showing a code different than what is used to produce the example. |
m 1 revision imported from wikipedia:Template:Tl2/doc |
||
(No difference)
|
Latest revision as of 12:25, 12 August 2023
This is a documentation subpage for Template:Tl2. It may contain usage information, categories and other content that is not part of the original template page. |
![]() | <code>-styled {{tl}} that can link to sister projects. |
This is the {{tl2}} template.
{{tl2}} is similar to {{tl}}. Tl stands for Template link. {{tl2}} is a 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.
{{tl2}} differs from {{tl}} in that it displays with a wider, monospaced text style (like {{tlx}}) and also takes the named parameters |sister=
and |lang=
so that it may also be used to list and link templates on other English and non-English-language sister projects.
Related template[edit source]
{{tlx}} displays with the same enhanced presentation and can also expand several placeholder parameters to generate a sample template call.
Usage[edit source]
- {{tl2|template_name}}
- equivalent to {{tl|template_name}}
- {{tl2 |sister=sister_id |template_name}}
- to display a template from a sister project (e.g. {{tl2 |sister=V |template_name}} for Wikiversity)
- {{tl2 |lang=lang_id |sister=sister_id |template_name}}
- to display a template from a sister project in another language (e.g. {{tl2 |lang=fr |sister=V |template_name}} for a template from the French Wikisource project)
Examples[edit source]
Code | Result |
---|---|
{{tl|x0}}
|
{{x0}} |
{{tl2|x1}}
|
{{x1}}
|
{{tl2|sister=M|3x}}
|
{{3x}}
|
{{tl2|sister=wikibooks|lang=de|WP}}
|
{{WP}}
|
See also[edit source]
- Template:Tiw
- Template:Tiw
- Template:Tiw to produce a [t]emplate [l]ink with single [p]arameter.
- Template:Tiw to produce a [t]emplate [l]ink with e[x]tended 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 e[xp]an[d] (i.e. demonstrate) a template in situ.
Template:Template-linking templates