Changes

Jump to navigation Jump to search
m
Reverted edits by 2603:6010:8406:624B:DC99:8CA2:D380:C3F9 (talk) (HG) (3.4.10)
{{Documentation subpage}}
<!----PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOTTOM OF THIS PAGE---->
{{Mbox |image=[[File:Walnut.png|30px|link=|alt=]] |text=&lt;code&gt;-styled {{tl|tl}} that can link to sister projects.}}

This is the {{tl|tl2}} template.

{{tlf|tl2}} is similar to {{tl|tl}}. '''Tl''' stands for '''T'''emplate '''l'''ink. {{tlf|tl2}} is a [[w:Macro (computer science)|macro]] [[m:Help:template|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.

{{tlf|tl2}} differs from {{tlf|tl}} in that it displays with a wider, monospaced text style (like {{tlf|tlx}}) and also takes the named parameters {{para|sister}} and {{para|lang}} so that it may also be used to list and link templates on other English and non-English-language sister projects.

==Related template==
{{tl|tlx}} displays with the same enhanced presentation and can also expand several placeholder parameters to generate a sample template call.

==Usage==
: {{tlx|tl2|''template_name''}}
:: equivalent to {{tlf|tl{{!}}''template_name''}}

: {{tlx|tl2&nbsp;|sister{{=}}''sister_id''&nbsp;|''template_name''}}
:: to display a template from a sister project (e.g. {{tlf|tl2&nbsp;{{!}}sister{{=}}V&nbsp;{{!}}''template_name''}} for Wikiversity)

: {{tlx|tl2&nbsp;|lang{{=}}''lang_id''&nbsp;|sister{{=}}''sister_id''&nbsp;|''template_name''}}
:: to display a template from a sister project in another language (e.g. {{tlf|tl2&nbsp;{{!}}lang{{=}}fr&nbsp;{{!}}sister{{=}}V&nbsp;{{!}}''template_name''}} for a template from the French Wikisource project)

==Examples==
{| class=wikitable
! Code
! Result
|-
| <code><nowiki>{{tl|x0}}</nowiki></code>
| {{tl|x0}}
|-
| <code><nowiki>{{tl2|x1}}</nowiki></code>
| {{tl2|x1}}
|-
| <code><nowiki>{{tl2|sister=M|3x}}</nowiki></code>
| {{tl2|sister=M|3x}}
|-
| <code><nowiki>{{tl2|sister=wikibooks|lang=de|WP}}</nowiki></code>
| {{tl2|sister=wikibooks|lang=de|WP}}
|}

==See also==
* {{tiw|tl2}}
* {{tiw|tl}}
* {{tiw|tlp}} to produce a [t]emplate [l]ink with single [p]arameter.
* {{tiw|tlx}} to produce a [t]emplate [l]ink with e[x]tended number of parameters.
* {{tiw|tlsp}} to produce a [t]emplate [l]ink that's [[Wikipedia:Substitution|[s]ubst:]]ituted, with a single [p]arameter.
* {{tiw|lts}}
* {{tiw|tlu}}, tl or tlp in any [[Wikipedia:Namespaces|namespace]].
* {{lcs|Internal template-link templates}}
* {{tiw|xpd}} to e[xp]an[d] (i.e. demonstrate) a template ''in situ''.

{{Template-linking templates}}

<includeonly>{{Sandbox other||
<!----CATEGORIES BELOW THIS LINE, PLEASE:---->
[[Category:Internal template-link templates]]
[[Category:Interwiki link templates]]
[[Category:Wikitext typing-aid templates]]
}}</includeonly>

Navigation menu