high-risk|2,500,000+
replaced <tt>, template name, sandbox non-categorization, category
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
{{high-risk|2,500,000+}}
{{High-risk|2,500,000+}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
<!-- PLEASE ADD CATEGORIES WHERE INDICATED AT THE BOcodeOM OF THIS PAGE -->
__NOTOC__
__NOTOC__


The '''template link''' template is a simple [[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. A short example is that the code:
The '''template link''' template is a simple [[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. A short example is that the code:


::<code><nowiki>{{Tl|Example}}</nowiki></code>
::<code><nowiki>{{tl|Example}}</nowiki></code>
:generates
:generates
::{{Tl|Example}}
::{{tl|Example}}


<templatedata>{
<templatedata>{
Line 32: Line 32:
|-
|-
| <code><nowiki>{{Tl2|X1}}</nowiki></code>
| <code><nowiki>{{Tl2|X1}}</nowiki></code>
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:X1|X1]]<nowiki>}}</nowiki></tt>
| <code><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:X1|X1]]<nowiki>}}</nowiki></code>
|-
|-
| <code><nowiki>{{Tl2|SISTER=M:|3x}}</nowiki></code>
| <code><nowiki>{{Tl2|SISTER=M:|3x}}</nowiki></code>
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}M:{{ns:Template}}:3x|3x]]<nowiki>}}</nowiki></tt>
| <code><nowiki>{{</nowiki>[[{{{LANG|}}}M:{{ns:Template}}:3x|3x]]<nowiki>}}</nowiki></code>
|-
|-
| <code><nowiki>{{Tl2|SISTER=wikibooks|LANG=de:|WP}}</nowiki></code>
| <code><nowiki>{{Tl2|SISTER=wikibooks|LANG=de:|WP}}</nowiki></code>
| <tt><nowiki>{{</nowiki>[http://de.wikibooks.org/wiki/Vorlage:WP WP]<nowiki>}}</nowiki></tt><!--
| <code><nowiki>{{</nowiki>[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]<nowiki>}}</nowiki></code><!--
––––– This is currently a fraudulent output result... the template code needs modified to work
––––– This is currently a fraudulent output result... the template code needs modified to work
––––– per this plan, then this /doc file fixed up to match whatever the correct syntax actually is.
––––– per this plan, then this /doc file fixed up to match whatever the correct syntax actually is.
Line 50: Line 50:
|}
|}


==See also==
== See also ==
{{Tl-nav}}
{{Template-linking templates}}


<includeonly>
<includeonly>
{{#ifeq:{{SUBPAGENAME}}|sandbox | |
[[Category:Internal link templates]]
[[Category:Internal link templates]]
 
}}
</includeonly>
</includeonly>

Revision as of 22:59, 22 July 2014

Template:Documentation subpage Template:High-risk


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 that the code:

{{tl|Example}}
generates
{{Example}}

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.

Template parameters

ParameterDescriptionTypeStatus
template name1

the template name without the namespace prefix “Template:”, which is added automatically

Stringrequired

More complex variations are described below.

Example

Code Result
{{Tl|Void}} {{Void}}
{{Tl2|X1}} {{X1}}
{{Tl2|SISTER=M:|3x}} {{3x}}
{{Tl2|SISTER=wikibooks|LANG=de:|WP}} {{[hcodep://de.wikibooks.org/wiki/Vorlage:WP WP]}}
{{Tl|1==)}} {{=)}}

See also

Template:Template-linking templates