Template:Template link/doc: Difference between revisions
Jump to navigation
Jump to search
+Cat
No edit summary |
(+Cat) |
||
| Line 1: | Line 1: | ||
{{Documentation subpage}} | {{Documentation subpage}} | ||
<!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --> | <!-- Categories go where indicated at the bottom of this page, please; interwikis go to Wikidata (see also: [[Wikipedia:Wikidata]]). --> | ||
{{ | {{Redirect-distinguish|Template:TI|Template:Ti}}{{Template shortcut|tl|TL|t|temp}} | ||
{{#ifeq:{{FULLPAGENAME}} | Template:Template link | {{used in system}} {{cascade-protected template}} }} | {{#ifeq:{{FULLPAGENAME}} | Template:Template link | {{used in system}} {{cascade-protected template}} }} | ||
The '''template link''' template 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 the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it. | The '''template link''' template 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 the template name as code rather than actually invoking it. Its primary use is in instruction and documentation where it is used to refer to a template by name without invoking it. | ||
| Line 7: | Line 7: | ||
Note that this template may be used under the name "tee-el" (tl) as well as "tee-one" (t1)— both function the same way and produce the same results. This is not true for all such visually confusing templates containing a possible 1/l mix-up as they are not interchangeable. | Note that this template may be used under the name "tee-el" (tl) as well as "tee-one" (t1)— both function the same way and produce the same results. This is not true for all such visually confusing templates containing a possible 1/l mix-up as they are not interchangeable. | ||
'''{{ | '''{{Tl|Tla}}''' works exactly like {{tl|tl}} with the addition of optionally displaying '''a'''lternative label text (link label). '''{{Tl|Tlg}}''' can include the use of parameters in the template (as <nowiki>{{{1}}}</nowiki>). | ||
==Examples== | ==Examples== | ||
A short example of its use is: | A short example of its use is: | ||
::{{tji|tl|Example}} | :: {{tji|tl|Example}} | ||
:which generates | : which generates | ||
::{{tl|Example}} | :: {{tl|Example}} | ||
Other longer examples: | Other longer examples: | ||
| Line 84: | Line 84: | ||
<!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> | <!-- Categories go below this line, please; interwikis go to Wikidata, thank you! --> | ||
[[Category:Internal template-link templates]] | [[Category:Internal template-link templates]] | ||
[[Category:Variadic templates]] | |||
}}</includeonly> | }}</includeonly> | ||