Template:Tl View history

No edit summary
No edit summary
Line 3: Line 3:
   |NOLINK
   |NOLINK
   |nl=<nowiki>{{</nowiki>{{{1|}}}<nowiki>}}</nowiki>
   |nl=<nowiki>{{</nowiki>{{{1|}}}<nowiki>}}</nowiki>
   |{{{{subst:DraftLink|Tl/TlE}}|{{{1|}}}}}{{red|ERROR: [[{{subst:DraftLink|Tl}}|unrecognized]] {{Para||{{{2|}}} }} }}}}
   |{{red|ERROR: incorrect syntax in nowiki>{{</nowiki>{{tl}}<nowiki>}}</nowiki> usage - unrecognized {{Para||{{{2|}}} }}}}}}
|<nowiki>{{</nowiki>{{#ifeq: {{padleft:|1|{{{1|}}}}}|:|[[{{{1|}}}|{{{1|}}}]]|{{#if:{{NAMESPACE:{{{1|}}}}}|[[{{{1|}}}]]|[[{{ns:Template}}:{{{1|}}}|{{{1|}}}]]}}}}<nowiki>}}</nowiki>}}</includeonly><noinclude>
|<nowiki>{{</nowiki>{{#ifeq: {{padleft:|1|{{{1|}}}}}|:|[[{{{1|}}}|{{{1|}}}]]|{{#if:{{NAMESPACE:{{{1|}}}}}|[[{{{1|}}}]]|[[{{ns:Template}}:{{{1|}}}|{{{1|}}}]]}}}}<nowiki>}}</nowiki>}}</includeonly><noinclude>
{{documentation}}
{{documentation}}
<!-- Categories and interwikis go on the /doc subpage. -->
<!-- Categories and interwikis go on the /doc subpage. -->
</noinclude>
</noinclude>

Revision as of 17:48, 30 June 2015

Documentation icon Template documentation[view] [edit] [history] [purge]


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
{{#if:

|{{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

  • {{#if:

|{{tl}} - {{#if: |{{Example}} - Linked to template using normal text.

  • {{#if:

|{{tlg}} - {{Example|par1|par2}} - Linked to template using normal text and show parameters.

  • {{#if:

|{{tlc}} - {{Example}} - Unlinked using monospace / code text.

  • {{#if:

|{{tlx}} - {{Example}} - Linked using monospace /code text.
These templates have not been imported from MediaWiki.

  • {{#if:

|{{tls}} - {{subst:Example}} - For templates that should be substituted and not called directly as a template.

  • {{#if:

|{{tl2}}

  • {{#if:

|{{tlp}}

  • {{#if:

|{{tlf}}

  • {{#if:

|{{tlsp}}

  • {{#if:

|{{tlu}}

The above documentation is transcluded from Template:Tl/doc.
Please add categories to the /doc subpage.
Subpages of this template.