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

Content deleted Content added
m Already four.
add template
 
(16 intermediate revisions by 15 users not shown)
Line 1:
{{Documentation subpage}}
{{Tlx|{{PAGENAME}}Tlsp}} is used in template lists. Unlike
 
{{Tlx|{{PAGENAME}}}} is used in template lists. Unlike
{{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 ===
;Up to threefive placeholders for parameters of the specified template name:
 
:{{Tlx|{{PAGENAME}}Tlsp|template name|param=value}}
;Up to three placeholders for parameters of the specified template name:
:{{Tlx|{{PAGENAME}}Tlsp|template name|param}}
:{{Tlx|{{PAGENAME}}Tlsp|template name|param1|2|3|4|5}}
:{{Tlx|Tlsp|template name|3=2=param=value}} Note: start from 2 because the "name" is parameter 1. Or...
:{{Tlx|{{PAGENAME}}|template name|1<tt>&#124;</tt>2<tt>&#124;</tt>3}}
:{{Tlx|{{PAGENAME}}Tlsp|template name|1<tt>&#124;</tt>2<tt>&#124;</tt>3param&amp;#12461;morevalue}}
;For templates supporting [[Help:Substitution#Optional_substitution|optional substitution]] just add <ttcode>subst=subst:</ttcode>
:{{Tlx|{{PAGENAME}}|template name|param&amp;#61;value}}
:{{Tlx|{{PAGENAME}}Tlsp|template name|1<tt>&#124;</tt>|2<tt>&#124;</tt>|3|46=subst=subst:}}
;For templates supporting [[Help:Substitution#Optional_substitution|optional substitution]] just add <tt>subst=subst:</tt>
:{{Tlx|{{PAGENAME}}|template name|1<tt>&#124;</tt>2<tt>&#124;</tt>3|4=subst=subst:}}
 
=== Example ===
<!-- some magic here where Tlx talks about Tlsp,
Tlx has the same limitations wrt parameters -->
Line 27 ⟶ 25:
| {{tlsp|template}}
|-
| {{Tlx|tlsp|template|1st|2nd<tt>&#124;</tt>|3rd|4th|5th}}
| {{tlsp|template|1st|2nd|3rd|4th|5th}}
|-
| {{Tlx|tlsp|template|3=2=param=value}}
| {{Pp-tlsp|template|small2=param=yesvalue}}
|-
| {{Tlx|tlsp|template|param&amp;#61;value}}
| {{tlsp|template|param&#61;value}}
|-
| {{Tlx|tlsp|template|1<tt>&#124;</tt>|2<tt>&#124;</tt>|3&amp;#124;okay}}
| {{tlsp|template|1|2|3&#124;okay}}
|-
| {{Tlx|tlsp|template|1<tt>&#124;</tt>|2<tt>&#124;</tt>|3|4|5|too muchmany}}
| {{tlsp|template|1|2|3|4|5|too muchmany}}
|-
| {{Tlx|tlsp|template|1<tt>&#124;</tt>|2<tt>&#124;</tt>|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'''
Line 59 ⟶ 60:
| {{tls|x0}}
|-
| {{Tlx|tlsp|x3|1st<tt>&#124;</tt>|2nd<tt>&#124;</tt>|3rd|4th|5th}}
| {{tlsp|x3|1st|2nd|3rd|4th|5th}}
|-
| {{Tlx|tlu|template:x3|1st<tt>&#124;</tt>|2nd<tt>&#124;</tt>|3rd}} &#160;
| {{tlu|template:x3|1st|2nd|3rd}}
|-
| {{Tlx|tlx|x3|1st<tt>&#124;</tt>|2nd<tt>&#124;</tt>|3rd}}
| {{tlx|x3|1st|2nd|3rd}}
|}{{-}}
 
=== See also ===
* {{Lts|{{PAGENAME}}Tlsp}} up to fourfive parameters
 
* {{Lts|{{PAGENAME}}}} up to four parameters
* {{Lts|Tl}} no parameter and no subst
* {{Lts|Tlp}} Tl + parameter
Line 78:
* {{Lts|Tlx}} like Tlsp without subst
 
{{Template-linking templates}}
<includeonly>
[[Category:Internal link templates|Tlsp]]
 
<includeonly>{{Sandbox other||
[[ko:틀:Tlsp]]
[[Category:Internal template-link templates|Tlsp]]
[[uk:Шаблон:Tlsp]]
}}</includeonly>
{{Pp-template|small=yes}}
</includeonly>