No edit summary |
Kentsmith9 (talk | contribs) (Added template) |
||
(9 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{doc subpage}} | {{doc subpage}} | ||
<!-- ADD DOCUMENTATION BELOW THIS LINE --> | |||
__NOTOC__ | |||
The '''template link''' template is a simple [[w:Macro (computer science)|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. A short example is that the code: | |||
::<code><nowiki>{{tl|Example}}</nowiki></code> | |||
:generates | |||
::{{tl|Example}} | |||
More complex variations are described below. | |||
===Related templates=== | |||
{{tlx|tlx}} displays with the same enhanced presentation, and also expands several 'placeholder' parameters to generate a sample template call. | |||
===Usage=== | |||
<pre> | |||
{{tl|Template name to display}} | |||
and | |||
{{tlx|Template name to display}} -- local link, just like tl. | |||
or | |||
{{tl|1==)}} -- use 1= where the template name contains an equals sign (as [[template:=)]] does). | |||
</pre> | |||
{{Template:tl/Suite}} | |||
<includeonly> | <includeonly> | ||
<!-- ADD CATEGORIES BELOW THIS LINE --> | <!-- ADD CATEGORIES BELOW THIS LINE --> | ||
[[Category:Typing-aid templates|{{PAGENAME}}]] | |||
[[Category:Internal link templates|{{PAGENAME}}]] | |||
<!-- ADD INTERWIKIS BELOW THIS LINE --> | <!-- ADD INTERWIKIS BELOW THIS LINE --> | ||
</includeonly> | </includeonly> |
Latest revision as of 05:53, 16 August 2022
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
The template link template 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. A short example is that the code:
{{tl|Example}}
- generates
- {{Example}}
More complex variations are described below.
Related templates
{{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 {{tlx|Template name to display}} -- local link, just like tl. or {{tl|1==)}} -- use 1= where the template name contains an equals sign (as [[template:=)]] does).
TL template suite
- {{tl}} - {{Example}} - Linked to template using normal text.
- {{tlg}} - {{Example|par1|par2}} - Linked to template using normal text and show parameters.
- {{tlc}} -
{{Example}}
- Unlinked using monospace / code text. - {{tlx}} -
{{Example}}
- Linked using monospace /code text.
These templates have not been imported from MediaWiki.
- {{tls}} - {{subst:Example}} - For templates that should be substituted and not called directly as a template.
- {{tl2}}
- {{tlp}}
- {{tlf}}
- {{tlsp}}
- {{tlu}}