Template:Template link/doc: Difference between revisions
Typo, I think |
Worked over the introduction, will do the rest soon. |
||
Line 1: | Line 1: | ||
{{Documentation subpage}} | |||
<!-- PLEASE ADD CATEGORIES AND INTERWIKIS AT THE BOTTOM OF THIS PAGE --> | |||
__NOTOC__ | __NOTOC__ | ||
This is the {{tl|tl}} template. | |||
{{ | 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. | |||
=== 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''. | |||
== Usage == | {{tlx|tlx}} displays with the same enhanced presentation, and also expands several 'placeholder' parameters to generate a sample template call. | ||
=== Usage === | |||
<pre> | <pre> | ||
{{Tl|template name to display}} | {{Tl|template name to display}} | ||
and | and | ||
Line 22: | Line 27: | ||
</pre> | </pre> | ||
== Example == | === Example === | ||
{| class="wikitable" | {| class="wikitable" | ||
! Code | ! Code | ||
Line 46: | Line 52: | ||
|} | |} | ||
== See also == | === See also === | ||
* {{tiw|tl}} — links and edit history of the Tl template. | * {{tiw|tl}} — links and edit history of the Tl template. | ||
* {{tiw|tl2}} — links and edit history of the Tl2 template. | * {{tiw|tl2}} — links and edit history of the Tl2 template. |
Revision as of 04:41, 25 March 2008
Template:Documentation subpage
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.
Related templates
Template:Tl2 differs in that it displays an arguably clearer result like {{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}}
displays with the same enhanced presentation, and also expands several 'placeholder' parameters to generate a sample template call.
Usage
{{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.
Example
Code | Result |
---|---|
{{Tl|x0}}
|
{{x0}} |
{{Tl2|x1}}
|
{{x1}} |
{{Tl2|SISTER=M:|3x}}
|
{{3x}} |
{{Tl2|SISTER=wikibooks|LANG=de:|WP}}
|
{{WP}} |
See also
- Template:Tiw — links and edit history of the Tl template.
- Template:Tiw — links and edit history of the Tl2 template.
- Template:Tiw — Template link, with single parameter.
- Template:Tiw — Template link, up to three parameters.
- Template:Tiw — Template link, ditto subst'ed.
- Template:Tiw — see Lts discussion for more variants.
- Template:Tiw - like
{{tl}}
/{{tlp}}
for any namespace. - Template:Tiw - Same as tl, but shows the braces as part of the link.
- Template:Lcs
- Template:Tiw - Show live example
Template:WPTSP loose ends bg:Шаблон:Ш/документация de:Vorlage:Tl eo:Ŝablono:Ŝ2/doc es:Plantilla:Template link/doc fa:الگو:الگوی/doc fi:Malline:Malline/doc fr:Modèle:M/doc he:תבנית:תב/doc ia:Patrono:Tl/doc ja:Template:Tl/doc ka:თარგი:Tl/doc kw:Template:Viz/doc or:Template:Tl/doc