Template:Tl/doc: Difference between revisions

Boobpedia - Encyclopedia of big boobs
Jump to navigationJump to search
(New page: {{Documentation subpage}} <includeonly>{{high-use| 600,000+ }}</includeonly> <!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> __NOTOC__ This is the {{tl|tl}} templa...)
 
No edit summary
Line 1: Line 1:
{{Documentation subpage}}
{{Documentation subpage}}
<includeonly>{{high-use| 600,000+ }}</includeonly>
<!-- 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 7: Line 6:
First a short example. This code: <code><nowiki>{{tl|example}}</nowiki></code> renders like this: {{tl|example}}
First a short example. This code: <code><nowiki>{{tl|example}}</nowiki></code> renders like this: {{tl|example}}


'''Tl''' stands for '''T'''emplate '''l'''ink. {{tl|tl}} 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.
'''Tl''' stands for '''T'''emplate '''l'''ink. {{tl|tl}} 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.
 
=== Related templates ===
 
{{tl2|tl2}} differs in that it displays an arguably clearer result 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''.
{{tlx|tlx}} displays with the same enhanced presentation, and also expands several 'placeholder' parameters to generate a sample template call.


=== Usage ===
=== Usage ===
Line 19: Line 12:
<pre>
<pre>
  {{Tl|template name to display}}
  {{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>
</pre>


Line 34: Line 20:
! Result
! Result
|-
|-
| <code><nowiki>{{Tl|x0}}</nowiki></code>
| <code><nowiki>{{Tl|bra}}</nowiki></code>
| {{[[Template:X0|x0]]}}
| {{[[Template:Bra|bra]]}}
|-
| <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]]
---->
|}
|}


=== See also ===
=== See also ===
* {{tl|tl2}} – Template link, up to three parameters and interwiki links.
* {{tl|tlp}} – Template link, with single parameter.
* {{tl|tlx}} – Template link, up to three parameters and interwiki links.
* {{tl|tlsp}} – Template link, ditto subst'ed.
* {{tl|lts}} – See Lts discussion for more variants.
* {{tl|tlu}} – Like {{tlx|tl}} / {{tlx|tlp}} for any namespace.
* {{tl|tn}} – Same as tl, but shows the braces as part of the link.
* {{tl|evd}} – Show live example
* {{tl|tlc}}, {{tl|tld}} and {{tl|tlf}} – Template names without links.
* [[:Category:Internal link templates]]
* [[:Category:Internal link templates]]



Revision as of 06:24, 31 May 2008

This is a documentation subpage for Template:Tl (see that page for the template itself).
It contains usage information, categories and other content that is not part of the original template page.

This is the {{Tl}} template.

First a short example. This code: {{tl|example}} renders like this: {{Example}}

Tl stands for Template link. {{Tl}} 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.

Usage

 {{Tl|template name to display}}

Example

Code Result
{{Tl|bra}} {{bra}}

See also