Template:Tlsp/doc
Jump to navigation
Jump to search
This is a documentation subpage for Template:Tlsp. It contains usage information, categories and other content that is not part of the original template page. |
{{tlsp/doc}} 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.
Usage[edit]
- Up to five placeholders for parameters of the specified template name:
- {{tlsp/doc|template name}}
- {{tlsp/doc|template name|param}}
- {{tlsp/doc|template name|1|2|3|4|5}}
- {{tlsp/doc|template name|2=param=value}} Note: start from 2 because the "name" is parameter 1. Or...
- {{tlsp/doc|template name|param=value}}
- For templates supporting optional substitution just add
subst=subst:
- {{tlsp/doc|template name|1|2|3|subst=subst:}}
Example[edit]
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|too many}} |
{{tlsp|template|1|2|3|4|5|subst=subst:}} | {{subst:template|1|2|3|4|5}} |
For similar examples see Tlx.
Comparison[edit]
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}} |
{{tlx|x3|1st|2nd|3rd}} | {{x3|1st|2nd|3rd}} |
See also[edit]
General-purpose formatting[edit]
Link style → | Linked | Unlinked | Linked with subst | Linked including braces | Linked with alternative text | |
---|---|---|---|---|---|---|
Text style ↓ | ↓ {{tlg}} options1 → | N/A | nolink=yes
|
subst=yes
|
braceinside=yes
|
alttext=Foo 2=Foo
|
Normal | N/A | {{tlg}}1, 2 {{tl}} {{tlp}}2 |
{{tlf}}2 | {{tls}} {{tlsp}} |
{{tn}} | {{tla}} |
Code
|
code=yes ortt=yes
|
{{tlx}} | {{tlc}}2 {{tld}}2 {{tnull}} |
{{tlxs}} | N/A | |
Bold | bold=yes
|
{{tlb}} | N/A | |||
Bold code
|
bold=yes|code=yes
|
{{tlxb}} |
- 1 {{tlg}} is the most general, allowing any combination of text style and/or link style options.
- 2 Prevents wrapping of text by placing it inside
<span class="nowrap">...</span>
tags. - 3 Uses monospace font but not
<code>...</code>
. - 4 Allows links to templates in any namespace.