Changes

Jump to navigation Jump to search
2,026 bytes added ,  04:03, 20 November 2010
Created page with "{{Documentation subpage}} <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> __NOTOC__ This is the {{tl2|tl2}} template. {{tl2|tl2}} is similar to {{tl|tl}..."
{{Documentation subpage}}
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE -->
__NOTOC__
This is the {{tl2|tl2}} template.

{{tl2|tl2}} is similar to {{tl|tl}}. '''Tl''' stands for '''T'''emplate '''l'''ink. {{tl2|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.

{{tl2|tl2}} differs from {{tl|tl}} in that it displays with a wider text style, like {{tlx|tlx}}, and also takes the named parameters 'SISTER=xx' and 'LANG=ll', so that it may also be used to ''list and link to templates on other English and non-English language sister projects''.

=== Usage ===

<pre>
{{Tl|template name to display}}
and
{{Tl2|template name to display}} -- local link, just like Tl.
or
{{Tl2|SISTER=V:|template name to display}} -- displays a template on Wikiversity
or
{{Tl2|LANG=fr.|SISTER=wikisource|template name to display}} -- displays a template
on the French Wikisource sister project.
</pre>

=== Example ===

{| class="wikitable"
! Code
! Result
|-
| <code><nowiki>{{Tl|x0}}</nowiki></code>
| {{[[Template:X0|x0]]}}
|-
| <code><nowiki>{{Tl2|x1}}</nowiki></code>
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}{{{SISTER|}}}{{ns:Template}}:x1|x1]]<nowiki>}}</nowiki></tt>
|-
| <code><nowiki>{{Tl2|SISTER=M:|3x}}</nowiki></code>
| <tt><nowiki>{{</nowiki>[[{{{LANG|}}}M:{{ns:Template}}:3x|3x]]<nowiki>}}</nowiki></tt>
|-
| <code><nowiki>{{Tl2|SISTER=wikibooks|LANG=de:|WP}}</nowiki></code>
| <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
----- per this plan, then this /doc file fixed up to match whatever the correct syntax actually is.
----- ALMOST work:
[[:de:wikibooks:{{ns:template}}:WP |WP]]
[[de:wikibooks:{{ns:template}}:WP |WP]]
---->
|}
166

edits

Navigation menu