Template:Tlsp
From MansunWiki
Revision as of 22:15, 15 July 2015 by DarkMavis (Talk | contribs) (Created page with "{{subst:[[{{ns:Template}}:{{{1|Tlsp}}}|{{{1|Tlsp}}}]]{{#if:{{{2|}}}||{{{2}}}}}{{#if:{{{3|}}}||{{{3}}}}}{{#if:{{{4|}}}||{{{4}}}}}{{#if...")
{{subst:Tlsp}}
This documentation is transcluded from Template:Tlsp/doc. (edit | history)
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
Note to editors: Please don't categorize this template by editing it directly. Instead, place the category in its documentation page, in its "includeonly" section.
{{Tlsp}}
is used in template lists. Unlike
{{Tlp}}
it includes "subst". Unlike
{{Tls}}
it allows to specify a parameter. These
features are hints how to use the specified template.
Contents
Usage
- Up to five placeholders for parameters of the specified template name:
{{Tlsp|template name}}
{{Tlsp|template name|param}}
{{Tlsp|template name|1|2|3|4|5}}
{{Tlsp|template name|2=param=value}}
Note: start from 2 because the "name" is parameter 1. Or...{{Tlsp|template name|param=value}}
- For templates supporting optional substitution just add subst=subst:
{{Tlsp|template name|1|2|3|subst=subst:}}
Example
Code | Result |
{{tlsp|template}}
|
{{subst:template}} |
{{tlsp|template|1st|2nd|3rd|4th|5th}}
|
{{subst:template|1st|2nd|3rd|4th|5th}} |
{{tlsp|template|2=param=value}}
|
{{subst:template|param=value}} |
{{tlsp|template|param=value}}
|
{{subst:template|param=value}} |
{{tlsp|template|1|2|3|okay}}
|
{{subst:template|1|2|3|okay}} |
{{tlsp|template|1|2|3|4|5|too many}}
|
{{subst:template|1|2|3|4|5}}{{#invoke:Error|error|{{tlsp}} only supports up to 5 template parameters|tag=}} |
{{tlsp|template|1|2|3|4|5|subst=subst:}}
|
{{subst:template|1|2|3|4|5|subst=subst:}} |
For similar examples see Tlx.
Comparison
Code | Result |
{{tl|x0}}
|
{{x0}} |
{{tlp|x1|param}}
|
{{x1|param}} |
{{tls|x0}}
|
{{subst:x0}} |
{{tlsp|x3|1st|2nd|3rd|4th|5th}}
|
{{subst:x3|1st|2nd|3rd|4th|5th}} |
{{tlu|template:x3|1st|2nd|3rd}}
|
{{template:x3|1st|2nd|3rd}} |
{{tlx|x3|1st|2nd|3rd}}
|
{{x3|1st|2nd|3rd}}
|
See also
- Template:Tlsp(edit talk links history) up to five parameters
- Template:Tl(edit talk links history) no parameter and no subst
- Template:Tlp(edit talk links history) Tl + parameter
- Template:Tls(edit talk links history) Tl + subst
- Template:Tlu(edit talk links history) like Tlx in any namespace
- Template:Tlx(edit talk links history) like Tlsp without subst