Template:Template link with subst and parameters/doc: Difference between revisions

Content deleted Content added
documentation
 
add template
 
(22 intermediate revisions by 18 users not shown)
Line 1:
{{Documentation subpage}}
Usage: {{Tlx|Tlsp|template name|first parameter|...}}<br />
{{Tlx|Tlsp}} is used in template lists. Unlike
Up to three parameters for the specified template are displayed as placeholders, more parameters are shown as "<tt>|</tt>''etc.''", for details see {{Tlx|Tlx}} and the [[{{TALKPAGENAME}}|talk]] page.
{{Tlx|Tlp}} it includes "[[WP:SUBST|subst]]". Unlike
{{Tlx|Tls}} it allows to specify a parameter. These
features are hints how to use the specified template.
 
== Usage ==
;If the template supports [[Help:Substitution#Optional_substitution|optional substitution]] with <tt>subst=subst:</tt> just add this info&#58;
;Up to five placeholders for parameters of the specified template name&#58;
:{{Tlx|Tlsp|template name|up to three parameters|4=subst=subst:}}
:{{Tlx|Tlsp|template name}}
:{{Tlx|Tlsp|template name|param}}
Usage: {{Tlx|Tlsp|template name|first parameter1|...2|3|4|5}}<br />
:{{Tlx|Tlsp|template name|3=2=param=value}} Note: start from 2 because the "name" is parameter 1. Or...
:{{Tlx|Tlsp|template name|param&amp;#61;value}}
;IfFor thetemplates template supportssupporting [[Help:Substitution#Optional_substitution|optional substitution]] withjust add <ttcode>subst=subst:</ttcode> just add this info&#58;
:{{Tlx|Tlsp|template name|up to three parameters1|42|3|6=subst=subst:}}
 
== Example ==
<!-- some magic here where Tlx talks about Tlsp,
Tlx has the same limitations wrt parameters -->
{|
| '''Code'''
| '''Result'''
|-
| {{Tlx|tlsp|template}}
| {{tlsp|template}}
|-
| {{Tlx|tlsp|template|1st|2nd|3rd|4th|5th}}
| {{tlsp|template|1st|2nd|3rd|4th|5th}}
|-
| {{Tlx|tlsp|template|3=2=param=value}}
| {{tlsp|template|2=param=value}}
|-
| {{Tlx|tlsp|template|param&amp;#61;value}}
| {{tlsp|template|param&#61;value}}
|-
| {{Tlx|tlsp|template|1|2|3&amp;#124;okay}}
| {{tlsp|template|1|2|3&#124;okay}}
|-
| {{Tlx|tlsp|template|1|2|3|4|5|too many}}
| {{tlsp|template|1|2|3|4|5|too many}}
|-
| {{Tlx|tlsp|template|1|2|3|4|5|8=subst=subst:}}
| {{tlsp|template|1|2|3|4|5|subst=subst:}}
|}
 
''For similar examples see [[Template talk:Tlx#Example|Tlx]].''
 
== Comparison ==
{|
| '''Code'''
| '''Result'''
|-
| {{Tlx|tl|x0}}
| {{tl|x0}}
|-
| {{Tlx|tlp|x1|param}}
| {{tlp|x1|param}}
|-
| {{Tlx|tls|x0}}
| {{tls|x0}}
|-
| {{Tlx|tlsp|x3|1st|2nd|3rd|4th|5th}}
| {{tlsp|x3|1st|2nd|3rd|4th|5th}}
|-
| {{Tlx|tlu|template:x3|1st|2nd|3rd}} &#160;
| {{tlu|template:x3|1st|2nd|3rd}}
|-
| {{Tlx|tlx|x3|1st|2nd|3rd}}
| {{tlx|x3|1st|2nd|3rd}}
|}{{-}}
 
== See also ==
* {{Lts|Tlsp}} up to five parameters
* {{Lts|Tl}} no parameter and no subst
* {{Lts|Tlp}} Tl + parameter
* {{Lts|Tls}} Tl + subst
* {{Lts|Tlu}} like Tlx in any namespace
* {{Lts|Tlx}} like Tlsp without subst
 
{{Template-linking templates}}
 
<includeonly>{{Sandbox other||
[[Category:Internal template-link templates]]
}}</includeonly>