Template:Tl/doc: Difference between revisions

From Citizendium
Jump to navigation Jump to search
imported>Caesar Schinas
imported>Caesar Schinas
mNo edit summary
 
(5 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{tl|tl}} is used to reference templates on Talk pages etc. Use of it generates a link to the template, wrapped in <nowiki>{{ }}</nowiki> tags and thus looking like an invocation of the template. For a version without brackets, see {{tl|tln}}. For a version which uses code tags, see {{tl|tlc}}.
=== Usage ===
=== Usage ===
The template takes two parameters : <code>{{tl|tl|name{{!}}arguments}}</code>.
# ''required'' &mdash; The name of the template to be linked to.
# ''optional'' &mdash; Any parameters which should be shown in the example call to the template. Separate multiple parameters with <code><nowiki>{{!}}</nowiki></code> rather than <code>|</code>.


<code><nowiki>{{Tl}}</nowiki></code> is used to reference templates on Talk pages etc. Use of it generates a link to the template, wrapped in matching <nowiki>{{ }}</nowiki>, thus looking like an invocation of the template.
=== Examples ===
 
{|class=wikitable
=== Example ===
! Code !! Result !! Explanation
 
|-
{|
|<code><nowiki>{{tl|Infobox}}</nowiki></code>  
|<code><nowiki>{{Tln|Infobox}}</nowiki></code>  
| {{tl|Infobox}}
| {{Tl|Infobox}}  
|| Using {{tl|tl}} with an existing template creates a link to it.
|| Using {{Tl|Tl}} with an existing template creates a link to it.
|-
|<code><nowiki>{{tl|tl}}</nowiki></code>  
| {{tl|tl}}  
| Using {{tl|tl}} on the template with the same name just shows the name.
|-
|-
|<code><nowiki>{{Tl|Tl}}</nowiki></code>  
|<code><nowiki>{{tl|Nonexistanttemplate}}</nowiki></code>  
| {{Tl|Tl}}  
| {{tl|Nonexistanttemplate}}  
| Using {{Tl|Tl}} on the template with the same name just shows the name.  
| Using {{tl|tl}} with a non-existing template name creates a red link with the template preload and editintro.
|-
|-
|<code><nowiki>{{Tl|Nonexistanttemplate}}</nowiki></code>  
|<code><nowiki>{{tl|template|param1{{!}}param2{{!}}param3}}</nowiki></code>  
| {{Tl|Nonexistanttemplate}}  
| {{tl|template|param1&#124;param2&#124;param3}}
| Using {{Tl|Tl}} with a non-existing template name creates a red link with the template preload and editintro.
| The second parameter takes  list of parameters to be shown in the example template call, separated either by <code><nowiki>{{!}}</nowiki></code> or by <code>&amp;#124;</code>.
|}
|}

Latest revision as of 03:09, 14 June 2009

{{tl}} is used to reference templates on Talk pages etc. Use of it generates a link to the template, wrapped in {{ }} tags and thus looking like an invocation of the template. For a version without brackets, see {{tln}}. For a version which uses code tags, see {{tlc}}.

Usage

The template takes two parameters : {{tl|name|arguments}}.

  1. required — The name of the template to be linked to.
  2. optional — Any parameters which should be shown in the example call to the template. Separate multiple parameters with {{!}} rather than |.

Examples

Code Result Explanation
{{tl|Infobox}} {{Infobox}} Using {{tl}} with an existing template creates a link to it.
{{tl|tl}} {{tl}} Using {{tl}} on the template with the same name just shows the name.
{{tl|Nonexistanttemplate}} {{Nonexistanttemplate}} Using {{tl}} with a non-existing template name creates a red link with the template preload and editintro.
{{tl|template|param1{{!}}param2{{!}}param3}} {{template|param1|param2|param3}} The second parameter takes list of parameters to be shown in the example template call, separated either by {{!}} or by &#124;.