Template:Tl: Difference between revisions

From NDWiki
Jump to navigation Jump to search
(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:
{{tlx|tlx|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}
{{tl|tl|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}


Result:
Result:
{{tlx|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}
{{tl|template|first parameter|second|third|fourth|fifth|sixth|seventh|eight|ninth}}


==Purpose and naming==
==Purpose and naming==
Line 52: Line 52:
:<tt>{&#123;{{PAGENAME}}{{!}}template name{{!}}param&amp;#61;value&#125;}</tt>
:<tt>{&#123;{{PAGENAME}}{{!}}template name{{!}}param&amp;#61;value&#125;}</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|SISTER=W:|Tl|x0}}
|{{Tl|Tl|x0}}
|{{Tl|SISTER=W:|x0}}
|{{Tl|x0}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|Abc}}
|{{Tl|Tl|abc}}
|{{Tl|SISTER=W:|Abc}}
|{{Tl|abc}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|ABC}}
|{{Tl|Tl|ABC}}
|{{Tl|SISTER=W:|ABC}}
|{{Tl|ABC}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|AbC}}
|{{Tl|Tl|x1|one}}
|{{Tl|SISTER=W:|AbC}}
|{{Tl|x1|one}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|x1|one}}
|{{Tl|Tl|x2|one|two}}
|{{Tl|SISTER=W:|x1|one}}
|{{Tl|x2|one|two}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|x2|one|two}}
|{{Tl|Tl|x3|1<tt>&#124;</tt>2<tt>&#124;</tt>3}}
|{{Tl|SISTER=W:|x2|one|two}}
|{{Tl|x3|1|2|3}}
||&#160;
||&#160;
|-
|-
|{{Tl|SISTER=W:|Tl|x3|1<tt>&#124;</tt>2<tt>&#124;</tt>3}}
|{{Tl|Tl|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3|4}}
|{{Tl|SISTER=W:|x3|1|2|3}}
|{{Tl|x4|1|2|3|4}}
||&#160;
|up to 12 parameters, then ...
|-
|-
|{{Tl|SISTER=W:|Tl|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3|4}}
|{{Tl|Tl|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3&amp;#124;4}}
|{{Tl|SISTER=W:|x4|1|2|3|4}}
|{{Tl|x4|1|2|3&#124;4}}
|up to 5 parameters, then ...
|<tt>&amp;#124;</tt> for more
|-
|-
|{{Tl|SISTER=W:|Tl|x4|1<tt>&#124;</tt>2<tt>&#124;</tt>3&amp;#124;4}}
|{{Tl|Tl|x1|x&#61;u}}
|{{Tl|SISTER=W:|x4|1|2|3&#124;4}}
|{{Tl|x1|x=u}}
|align="right"|<tt>&amp;#124;</tt> for more
|'''"="''' won't work
|-
|-
|{{Tl|SISTER=W:|Tl|x1|x&#61;u}}
|{{Tl|Tl|x1|x&amp;#61;u}}
|{{Tl|SISTER=W:|x1|x=u}}
|{{Tl|x1|x&#61;u}}
|'''=''' won't work
|<tt>&amp;#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 "&#124;..."). 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&#124;more}}
{{Tl|template name|param&#61;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&#124;4}} {{x4|1|2|3|4}} &#124; for more
{{Tl|x1|x=u}} {{x1}} "=" won't work
{{Tl|x1|x&#61;u}} {{x1|x=u}} &#61; is okay

Source