Template:Tlsp/doc
{{#ifeq: doc | doc
|
{{
#ifeq: show | show
| {{
{{#switch:
{{#if:
|
| {{#if:
|
{{#ifeq:|
| talk
|
}}
|
{{#ifeq:template|template talk
| talk
| template
}}
}}
}}
| main | = ambox | talk = tmbox | user = ombox | wikipedia = ombox | file | image = imbox | mediawiki = ombox | template = ombox | help = ombox | category = cmbox | portal = ombox | book = ombox | other | #default = ombox
}}
| type = notice
| image = 40px
| imageright =
| class =
| style =
| textstyle =
| text = This is a documentation subpage for Template:Tlsp.
It contains usage information, categories, interlanguage links and other content that is not part of the original {{ #if: | {{{text2}}} | {{ #if: | {{{text1}}} | {{ #ifeq: Template | User | template template page | {{ #if: Template |template page|article}}}}}}}}.
| small =
| smallimage =
| smallimageright =
| smalltext =
| subst =
| date =
}}
}}{{
#if:
|
| {{#ifexist:Template:Tlsp|[[Category:{{
#switch: Template
| Template = Template
| User = User
| #default = Wikipedia
}} documentation pages]]|}}
}}
| }}
{{{{#if:|subst:}}Tlsp/doc{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} is used in template lists. Unlike {{{{#if:|subst:}}Tlp{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} it includes "subst". Unlike {{{{#if:|subst:}}Tls{{#if:| |{{{2}}} }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} it allows to specify a parameter. These features are hints how to use the specified template.
Usage
- Up to five placeholders for parameters of the specified template name:
- {{{{#if:|subst:}}Tlsp/doc{{#if:template name|
|template name }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}
|template name }}{{#if:param| |param }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}
|template name }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}
|template name }}{{#if:2=param=value| |2=param=value }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} Note: start from 2 because the "name" is parameter 1. Or...
|template name }}{{#if:param=value| |param=value }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}
- For templates supporting optional substitution just add subst=subst:
- {{{{#if:|subst:}}Tlsp/doc{{#if:template name|
|template name }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:subst=subst:| |subst=subst: }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}}
Example
| Code | Result | ||||||||
| subst:}}tlsp{{#if:template|
|template }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:||{{{2}}}}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:1st| |1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:4th| |4th }}{{#if:5th| |5th }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:1st||1st}}{{#if:2nd||2nd}}{{#if:3rd||3rd}}{{#if:4th||4th}}{{#if:5th||5th}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:2=param=value| |2=param=value }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:param=value||param=value}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:param=value| |param=value }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:param=value||param=value}}{{#if:||{{{3}}}}}{{#if:||{{{4}}}}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3|okay| |3|okay }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:1||1}}{{#if:2||2}}{{#if:3|okay||3|okay}}{{#if:||{{{5}}}}}{{#if:||{{{6}}}}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:too many| |too many }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:1||1}}{{#if:2||2}}{{#if:3||3}}{{#if:4||4}}{{#if:5||5}}{{#if:||subst={{{subst}}}}}}}{{#if:too many|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlsp{{#if:template|
|template }}{{#if:1| |1 }}{{#if:2| |2 }}{{#if:3| |3 }}{{#if:4| |4 }}{{#if:5| |5 }}{{#if:subst=subst:| |subst=subst: }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:template{{#if:1||1}}{{#if:2||2}}{{#if:3||3}}{{#if:4||4}}{{#if:5||5}}{{#if:subst:||subst=subst:}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
For similar examples see Tlx.
Comparison
| Code | Result | ||||||||
| subst:}}tl{{#if:x0|
|x0 }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{x0}} | ||||||||
| subst:}}tlp{{#if:x1|
|x1 }}{{#if:param| |param }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{{{#if:x1 | x1 | tlp|... }}{{#ifeq:param|param| |param }}{{#ifeq:x | |{{{3}}} }}{{#ifeq:x | |{{{4}}} }}{{#ifeq:x | |{{{5}}} }}{{#ifeq:x | |{{{6}}} }}{{#ifeq:x | |{{{7}}} }}{{#ifeq:x | |{{{8}}} }}{{#ifeq:x | |{{{9}}} }}}} |
| subst:}}tls{{#if:x0|
|x0 }}{{#if:| |{{{3}}} }}{{#if:| |{{{4}}} }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:x0}} | ||||||||
| subst:}}tlsp{{#if:x3|
|x3 }}{{#if:1st| |1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:4th| |4th }}{{#if:5th| |5th }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{subst:x3{{#if:1st||1st}}{{#if:2nd||2nd}}{{#if:3rd||3rd}}{{#if:4th||4th}}{{#if:5th||5th}}{{#if:||subst={{{subst}}}}}}}{{#if:|<{{#switch:{{{tag}}} | p=p | span=span | div=div | #default=strong
}} class="error">{{tlsp}} only supports up to 5 template parameters</{{#switch:{{{tag}}} |
p=p | span=span | div=div | #default=strong
}}>}} |
| subst:}}tlu{{#if:template:x3|
|template:x3 }}{{#if:1st| |1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
{{template:x3{{#if:1st|
|1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} | ||||||||
| subst:}}tlx{{#if:x3|
|x3 }}{{#if:1st| |1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
subst:}}x3{{#if:1st|
|1st }}{{#if:2nd| |2nd }}{{#if:3rd| |3rd }}{{#if:| |{{{5}}} }}{{#if:| |{{{6}}} }}{{#if:| |{{{7}}} }}{{#if:| |{{{8}}} }}{{#if:| |{{{9}}} }}{{#if:| |{{{10}}} }}{{#if:| |{{{11}}} }}{{#if:| |... }}}} |
See also
- Template:Tlsp/doc (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