Jump to content

Template:Tl/doc: Difference between revisions

From LabVIEW Wiki
No edit summary
Update documentation, remove Tl2
Line 1: Line 1:
<includeonly>:''This template documentation is <!---
<noinclude>{{documentation subpage}}</noinclude>
-----
---->transcluded from [[Template:Tl/doc]]'' </includeonly><!---
-----
----><noinclude><!---
-----
---->
<!-- EDIT TEMPLATE DOCUMENTATION BELOW THIS LINE ----><!---
-----
---->
</noinclude>
__NOTOC__
__NOTOC__
==Documentation==
==Documentation==


{{Tlx|Tl}} and {{Tl|Tl2}} are simple macro templates used to display a template name as a link. '''Tl''' stands for '''T'''emplate '''l'''ink.  
{{Tlx|Tl}} is a simple macro template used to display a template name as a link. '''Tl''' stands for '''T'''emplate '''l'''ink. It does not support any additional parameters (use [[:Template:Tlx|Tlx]] instead).


:Tl2 differs in that it displays an arguably clearer result like {{[[Template:Tlx|Tlx]]}}, and also like 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''.
;related: {{Tl2|Tlx}} displays with the same enhanced presentation, and also expands several 'placeholder' parameters to generate a sample template call.
== Usage ==
== Usage ==


<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 38: Line 16:
! Result
! Result
|-
|-
| <code><nowiki>{{Tl|x0}}</nowiki></code>
| {{tlx|Tl|Stub}}
| {{[[Template:X0|x0]]}}
| {{Tl|Stub}}
|-
| <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]]
---->
|}
|}
<noinclude>
[[category:Template documentation]]
</noinclude>

Revision as of 16:18, 4 August 2024

This is the documentation page for Template:Tl.
When it is viewed directly, links using variables may appear broken; do not replace these with hardcoded page names or URLs.

Documentation

{{Tl}} is a simple macro template used to display a template name as a link. Tl stands for Template link. It does not support any additional parameters (use Tlx instead).

Usage

 {{Tl|template name to display}}

Example

Code Result
{{Tl|Stub}} {{Stub}}