Difference between revisions of "Template:Tl/doc"

From Wiki
Jump to navigation Jump to search
(Add documentation)
 
 
(3 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Documentation subpage}}
+
{{documentation subpage}}
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
 
__NOTOC__
 
__NOTOC__
Line 5: Line 5:
 
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:
 
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:
  
::<code><nowiki>{{Tl|Example}}</nowiki></code>
+
::<code><nowiki>{{tl|Example}}</nowiki></code>
  
 
:generates
 
:generates
  
::{{Tl|Example}}
+
::{{tl|Example}}
  
 
More complex variations are described below.
 
More complex variations are described below.
Line 18: Line 18:
 
! Result
 
! Result
 
|-
 
|-
| <code><nowiki>{{Tl|Void}}</nowiki></code>
+
| <code><nowiki>{{tl|Void}}</nowiki></code>
 
| {{[[Template:Void|Void]]}}
 
| {{[[Template:Void|Void]]}}
 
|-
 
|-
| <code><nowiki>{{Tl2|X1}}</nowiki></code>
+
| <code><nowiki>{{tl2|X1}}</nowiki></code>
 
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:X1|X1]]<nowiki>}}</nowiki></tt>
 
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:X1|X1]]<nowiki>}}</nowiki></tt>
 
|-
 
|-
| <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>
 
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}M:{{ns:Template}}:3x|3x]]<nowiki>}}</nowiki></tt>
 
|-
 
|-
| <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><!---
 
| <tt><nowiki>{{</nowiki>[http://de.wikibooks.org/wiki/Vorlage:WP WP]<nowiki>}}</nowiki></tt><!---
 
----- 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
Line 36: Line 36:
 
---->
 
---->
 
|-
 
|-
| <code><nowiki>{{Tl|1==)}}</nowiki></code>
+
| <code><nowiki>{{tl|1==)}}</nowiki></code>
| {{Tl|1==)}}
+
| {{tl|1==)}}
 
|}
 
|}
  
 
===See also===
 
===See also===
 +
* {{tl|tlf}} for displaying a template's name without a link.
 
* [http://en.wikipedia.org/wiki/Template:Para Template:Para]
 
* [http://en.wikipedia.org/wiki/Template:Para Template:Para]

Latest revision as of 14:28, 29 September 2012


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}}

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}} {{WP}}
{{tl|1==)}} {{=)}}

See also