m (decomplexifying) |
m (decomplexifying) |
||
Line 3: | Line 3: | ||
This is the '''{{tlc|{{lc:{{BASEPAGENAME}}}}}}''' template. | This is the '''{{tlc|{{lc:{{BASEPAGENAME}}}}}}''' template. | ||
== Purpose and naming == | == Purpose and naming == | ||
When a template name with braces is to be shown in documentation, the braces have to be escaped in some way so it doesn't become an actual call to the template. Instead of using <code><nowiki></nowiki></code> tags you can write it more simply and concisely by using the {{tlc|tlc | When a template name with braces is to be shown in documentation, the braces have to be escaped in some way so it doesn't become an actual call to the template. Instead of using <code><nowiki></nowiki></code> tags you can write it more simply and concisely by using the {{tlc|tlc}} templates. | ||
These templates work similarly to {{tlc|tl}} and {{tlc|tlx}}, but don't make the template name into a link. When writing documentation you might want to avoid a lot of unnecessary links, since they can decrease readability. So on the first occurrence of a template name use {{tlx|tl}} or {{tlx|tlx}}, and then use {{tlc|tlc | These templates work similarly to {{tlc|tl}} and {{tlc|tlx}}, but don't make the template name into a link. When writing documentation you might want to avoid a lot of unnecessary links, since they can decrease readability. So on the first occurrence of a template name use {{tlx|tl}} or {{tlx|tlx}}, and then use {{tlc|tlc}} thereafter. | ||
{| class="wikitable" | {| class="wikitable" | ||
Line 21: | Line 19: | ||
| '''T'''emplate '''l'''ink '''c'''ode | | '''T'''emplate '''l'''ink '''c'''ode | ||
|rowspan=2 |Uses the <code><nowiki><code>...</code></nowiki></code> tags meant for showing programming code. Essentially the non-linking equivalent of {{tlx|tlx}}. | |rowspan=2 |Uses the <code><nowiki><code>...</code></nowiki></code> tags meant for showing programming code. Essentially the non-linking equivalent of {{tlx|tlx}}. | ||
===Basic operation=== | ===Basic operation=== | ||
Line 33: | Line 26: | ||
:{{tlc|tlc|name|parameters}} = {{tlc|name|parameters}} | :{{tlc|tlc|name|parameters}} = {{tlc|name|parameters}} | ||
Line 42: | Line 34: | ||
* This template takes another ''template-name'' and some associated [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|(numbered) parameters]] (or 'pass parameters'), and displays them as an 'example demonstration' of how the ''template-name'' template could be coded, literally. Its primary use is in instruction and documentation. | * This template takes another ''template-name'' and some associated [[Help:Pipe trick|pipe-tricked]] [[m:Parameter#Parameters|(numbered) parameters]] (or 'pass parameters'), and displays them as an 'example demonstration' of how the ''template-name'' template could be coded, literally. Its primary use is in instruction and documentation. | ||
*Specifics here??? <!-- Coding details, other parameters (SUBST?), other notes? Cf. [[Template:Tlx]]. --> | *Specifics here??? <!-- Coding details, other parameters (SUBST?), other notes? Cf. [[Template:Tlx]]. --> | ||
*Features of {{tlc|tlc | *Features of {{tlc|tlc}}: | ||
** They show a template name and up to eight parameters. | ** They show a template name and up to eight parameters. | ||
** They also show empty parameters. (See examples hereafter.) | ** They also show empty parameters. (See examples hereafter.) | ||
Line 50: | Line 42: | ||
{{tlc|Tlc|Template|first_parameter|second|third|fourth|...|eighth}} → {{Tlc|Template|first_parameter|second|third|fourth|fifth|sixth|seventh|eighth}} | {{tlc|Tlc|Template|first_parameter|second|third|fourth|...|eighth}} → {{Tlc|Template|first_parameter|second|third|fourth|fifth|sixth|seventh|eighth}} | ||
Line 85: | Line 75: | ||
If a vertical display with parameters on their own lines is desired, this can also be laid out manually in this manner, or more rapidly done with <code><nowiki><pre>...</pre></nowiki></code>. | If a vertical display with parameters on their own lines is desired, this can also be laid out manually in this manner, or more rapidly done with <code><nowiki><pre>...</pre></nowiki></code>. | ||
Here are the codes to emulate | Here are the codes to emulate {{tlc|tlc}} using <code><nowiki></code>: | ||
{| | {| | ||
! Using templates: !! Using <code><nowiki></code>: !! Rendered result: | ! Using templates: !! Using <code><nowiki></code>: !! Rendered result: | ||
|- | |- | ||
|style="padding-right: 50px;"| <code><nowiki>{{tlc|name|one{{=}}a|two{{=}}b}}</nowiki></code> | |style="padding-right: 50px;"| <code><nowiki>{{tlc|name|one{{=}}a|two{{=}}b}}</nowiki></code> |
Revision as of 15:09, 22 June 2015
This is a documentation subpage for . It contains usage information, categories and other content that is not part of the original template page. |
This is the {{tlc}}
template.
Purpose and naming
When a template name with braces is to be shown in documentation, the braces have to be escaped in some way so it doesn't become an actual call to the template. Instead of using <nowiki></nowiki>
tags you can write it more simply and concisely by using the {{tlc}}
templates.
These templates work similarly to {{tl}}
and {{tlx}}
, but don't make the template name into a link. When writing documentation you might want to avoid a lot of unnecessary links, since they can decrease readability. So on the first occurrence of a template name use {{tl}}
or {{tlx}}
, and then use {{tlc}}
thereafter.
Template | Mnemonic | Format differentiation | |||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{{tlc}}
|
Template link code | Uses the <code>...</code> tags meant for showing programming code. Essentially the non-linking equivalent of {{tlx}} .
Basic operationHere is how these templates look. Code is to the left; actual rendering to the right:
DocumentationFunctional details
Usage
ExamplesNote: Wikitables make the
An alternative to using constructs such as
you can use
Both render as
If a vertical display with parameters on their own lines is desired, this can also be laid out manually in this manner, or more rapidly done with Here are the codes to emulate
|