Template:Tl: Difference between revisions
(Copy from enwp) |
m (Changing category) |
||
(3 intermediate revisions by the same user not shown) | |||
Line 34: | Line 34: | ||
}}<nowiki>}}</nowiki></span></includeonly><noinclude> | }}<nowiki>}}</nowiki></span></includeonly><noinclude> | ||
Usage: | Usage: | ||
{{ | {{tl|tl|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}} | ||
Result: | Result: | ||
{{ | {{tl|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}} | ||
==Purpose and naming== | ==Purpose and naming== | ||
Line 52: | Line 52: | ||
:<tt>{{{{PAGENAME}}{{!}}template name{{!}}param&#61;value}}</tt> | :<tt>{{{{PAGENAME}}{{!}}template name{{!}}param&#61;value}}</tt> | ||
''Up to three placeholders for parameters of the specified template'' | ''Up to three placeholders for parameters of the specified template'' | ||
=== Example === | |||
{| border="1" cellpadding="4" class="wikitable" | {| border="1" cellpadding="4" class="wikitable" | ||
Line 58: | Line 60: | ||
! Remark | ! Remark | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x0}} | ||
|{{Tl | |{{Tl|x0}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|abc}} | ||
|{{Tl| | |{{Tl|abc}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|ABC}} | ||
|{{Tl | |{{Tl|ABC}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl| | |{{Tl|Tl|x1|one}} | ||
|{{Tl| | |{{Tl|x1|one}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x2|one|two}} | ||
|{{Tl| | |{{Tl|x2|one|two}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x3|1<tt>|</tt>2<tt>|</tt>3}} | ||
|{{Tl| | |{{Tl|x3|1|2|3}} | ||
||  | ||  | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x4|1<tt>|</tt>2<tt>|</tt>3|4}} | ||
|{{Tl| | |{{Tl|x4|1|2|3|4}} | ||
| | |up to 12 parameters, then ... | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x4|1<tt>|</tt>2<tt>|</tt>3&#124;4}} | ||
|{{Tl | |{{Tl|x4|1|2|3|4}} | ||
| | |<tt>&#124;</tt> for more | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x1|x=u}} | ||
|{{Tl| | |{{Tl|x1|x=u}} | ||
| | |'''"="''' won't work | ||
|- | |- | ||
|{{Tl | |{{Tl|Tl|x1|x&#61;u}} | ||
|{{Tl | |{{Tl|x1|x=u}} | ||
| | |<tt>&#61;</tt> is okay | ||
|} | |} | ||
==Source== | ==Source== | ||
* This template is a modified copy from [[Wikipedia:Tlx]]. | * This template is a modified copy from [[Wikipedia:Tlx]]. | ||
[[Category:Utility templates]] | |||
</noinclude> | </noinclude> |
Latest revision as of 10:16, 21 November 2008
Usage: {{tl|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}
Result: {{template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}
Purpose and naming
The Template link takes another template-name and some associated pipe-tricked (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: Up to five pass parameters (numbered or nowiki-keywords) for the specified template are displayed as 'placeholders', and over 5 parameters can be displayed using a coded vertical-bar (as in "|..."). A keyword parameter can be used, when tagged as a nowiki-keyword: "<nowiki>siz=10</nowiki>" with each keyword parameter surrounded by "<nowiki>" tags; see Examples at bottom.
Usage
- {{Tl|template name}}
- {{Tl|template name|param}}
- {{Tl|template name|1|2|3}}
- {{Tl|template name|1|2|3|more}}
- {{Tl|template name|param=value}}
Up to three placeholders for parameters of the specified template
Example
Code | Result | Remark |
---|---|---|
{{Tl|x0}} | {{x0}} | |
{{Tl|abc}} | {{abc}} | |
{{Tl|ABC}} | {{ABC}} | |
{{Tl|x1|one}} | {{x1|one}} | |
{{Tl|x2|one|two}} | {{x2|one|two}} | |
{{Tl|x3|1|2|3}} | {{x3|1|2|3}} | |
{{Tl|x4|1|2|3|4}} | {{x4|1|2|3|4}} | up to 12 parameters, then ... |
{{Tl|x4|1|2|3|4}} | {{x4|1|2|3|4}} | | for more |
{{Tl|x1|x=u}} | {{x1}} | "=" won't work |
{{Tl|x1|x=u}} | {{x1|x=u}} | = is okay |
Source
- This template is a modified copy from Wikipedia:Tlx.