Template:Tlsp/doc: Difference between revisions
m (→See also: remove template) |
m (Text replacement - "|" to "|") |
||
Line 14: | Line 14: | ||
:{{Tlx|{{PAGENAME}}|template name|param=value}} | :{{Tlx|{{PAGENAME}}|template name|param=value}} | ||
;For templates supporting [[Help:Substitution#Optional_substitution|optional substitution]] just add <tt>subst=subst:</tt> | ;For templates supporting [[Help:Substitution#Optional_substitution|optional substitution]] just add <tt>subst=subst:</tt> | ||
:{{Tlx|{{PAGENAME}}|template name|1<tt> | :{{Tlx|{{PAGENAME}}|template name|1<tt>|</tt>2<tt>|</tt>3|4=subst=subst:}} | ||
=== Example === | === Example === | ||
Line 32: | Line 32: | ||
| {{tlsp|template|param=value}} | | {{tlsp|template|param=value}} | ||
|- | |- | ||
| {{Tlx|tlsp|template|1<tt> | | {{Tlx|tlsp|template|1<tt>|</tt>2<tt>|</tt>3&#124;okay}} | ||
| {{tlsp|template|1|2|3 | | {{tlsp|template|1|2|3|okay}} | ||
|- | |- | ||
| {{Tlx|tlsp|template|1|2|3|4|5|too many}} | | {{Tlx|tlsp|template|1|2|3|4|5|too many}} | ||
Line 61: | Line 61: | ||
| {{tlsp|x3|1st|2nd|3rd|4th|5th}} | | {{tlsp|x3|1st|2nd|3rd|4th|5th}} | ||
|- | |- | ||
| Tlx tlu template:x3 1st<tt> | | Tlx tlu template:x3 1st<tt>|</tt>2nd<tt>|</tt>3rd   | ||
| tlu template:x3 1st 2nd 3rd | | tlu template:x3 1st 2nd 3rd | ||
|- | |- | ||
| {{Tlx|tlx|x3|1st<tt> | | {{Tlx|tlx|x3|1st<tt>|</tt>2nd<tt>|</tt>3rd}} | ||
| {{tlx|x3|1st|2nd|3rd}} | | {{tlx|x3|1st|2nd|3rd}} | ||
|}{{-}} | |}{{-}} |
Latest revision as of 21:32, 11 April 2023
![]() |
This is a documentation subpage for Template:Tlsp (see that page for the template itself). It contains usage information, categories and other content that is not part of the original template page. |
{{Tlsp/doc{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} is used in template lists. Unlike {{Tlp{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} it includes "subst". Unlike {{Tls{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} it allows to specify a parameter. These features are hints how to use the specified template.
Usage[edit source]
- Up to five placeholders for parameters of the specified template name:
- {{Tlsp/doc{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}
- {{Tlsp/doc{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}
- {{Tlsp/doc{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}
- {{Tlsp/doc{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}
- For templates supporting optional substitution just add subst=subst:
- {{Tlsp/doc{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}}
Example[edit source]
Code | Result |
{{tlsp{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:template{{{2}}}{{{3}}}{{{4}}}{{{5}}}{{{6}}}subst={{{subst}}}}} |
{{tlsp{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:templatesubst={{{subst}}}}} |
{{tlsp{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:template{{{3}}}{{{4}}}{{{5}}}{{{6}}}subst={{{subst}}}}} |
{{tlsp{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:template{{{6}}}subst={{{subst}}}}} |
{{tlsp{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:templatesubst={{{subst}}}}}{{tlsp}} only supports up to 5 template parameters |
{{tlsp{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:template}} |
For similar examples see Tlx.
Comparison[edit source]
Code | Result |
{{tl{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{x0}} |
{{tlp{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{x1{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}}} |
{{tls{{{3}}}{{{4}}}{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:x0}} |
{{tlsp{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{subst:x3subst={{{subst}}}}} |
2nd|3rd | tlu template:x3 1st 2nd 3rd |
{{tlx{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} | {{x3{{{5}}}{{{6}}}{{{7}}}{{{8}}}{{{9}}}{{{10}}}{{{11}}}...}} |
See also[edit source]
- Template:Tlsp/doc (edit talk links history) up to four 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
- Lts Tlu like Tlx in any namespace
- Template:Tlx (edit talk links history) like Tlsp without subst