Template:Template link/doc: Difference between revisions
Page last edited 3 weeks ago by Xeverything11
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+}} | ||
<!-- PLEASE ADD CATEGORIES | <!-- 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>{{ | ::<code><nowiki>{{tl|Example}}</nowiki></code> | ||
:generates | :generates | ||
::{{ | ::{{tl|Example}} | ||
<templatedata>{ | <templatedata>{ | ||
Line 32: | Line 32: | ||
|- | |- | ||
| <code><nowiki>{{Tl2|X1}}</nowiki></code> | | <code><nowiki>{{Tl2|X1}}</nowiki></code> | ||
| < | | <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> | ||
| < | | <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> | ||
| < | | <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 == | ||
{{ | {{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.
Parameter | Description | Type | Status | |
---|---|---|---|---|
template name | 1 | the template name without the namespace prefix “Template:”, which is added automatically | String | required |
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