Template:Substitute/doc: Difference between revisions

ArrowHead294 (talk | contribs)
mNo edit summary
ArrowHead294 (talk | contribs)
mNo edit summary
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
{{dochead}}{{{{ROOTPAGENAMEE}}|no}}{{wikipedia|Template:Always substitute|Template:Never substitute|Template:May be substituted}}
{{dochead}}{{wikipedia|Template:Always substitute|Template:Never substitute|Template:May be substituted}}
This template is used as a header to show whether a template should be substituted or not.
This template is used to indicate that a template can be substituted. '''This template itself, however, should never be substituted.'''


{{tlx|substitute}} should be placed on the {{w|Wikipedia:Template documentation|documentation}} {{w|subpage|s=wp}} of any template that requires {{w|substitution|s=mw:help}} rather than {{w|transclusion|s=mw:help}} (i.e. not on the template's own page itself).
{{tlx|substitute}} should be placed on the {{w|Wikipedia:Template documentation|documentation}} {{w|subpage|s=wp}} of any template that can be used with {{w|substitution|s=mw:help}} rather than {{w|transclusion|s=mw:help}} (i.e. not on the template's own page itself).


Templates that should always be substituted are automatically added to [[:Category:Substituted templates]].
Templates that should always be substituted are automatically added to [[:Category:Substituted templates]].
Line 8: Line 8:
=== Parameters ===
=== Parameters ===
; <code>{{{<nowiki />1}}}</code> (required)
; <code>{{{<nowiki />1}}}</code> (required)
: Set this to <code>always</code> if the template ''should always'' be substituted, <code>no</code> if the template ''should not'' be substituted, or <code>both</code> if the template can be either substituted or transcluded.
: Set this to <code>always</code> if the template ''should always'' be substituted or <code>no</code> if the template ''should not'' be substituted. Leave it blank if the template can be either substituted or transcluded.


=== Usage ===
=== Usage ===
==== Templates that ''can'' be substituted ====
Equivalent to Wikipedia's {{w|Template:May be substituted}}. This is the default option, indicating that a template works either way.
<pre>{{substitute}}</pre>
{{ {{ROOTPAGENAMEE}} }}
==== Templates that ''must'' be substituted ====
==== Templates that ''must'' be substituted ====
Equivalent to Wikipedia's {{w|Template:Always substitute}}.
Equivalent to Wikipedia's {{w|Template:Always substitute}}.
<pre>{{substitute|always}}</pre>
<pre>{{substitute|always}}</pre>
{{{{ROOTPAGENAMEE}}|always|tname=[Template name]}}
{{{{ROOTPAGENAMEE}}|always}}


==== Templates that ''must not'' be substituted ====
==== Templates that ''must not'' be substituted ====
Line 20: Line 25:
<pre>{{substitute|no}}</pre>
<pre>{{substitute|no}}</pre>
{{{{ROOTPAGENAMEE}}|no}}
{{{{ROOTPAGENAMEE}}|no}}
==== Templates that can be substituted or transcluded ====
Equivalent to Wikipedia's {{w|Template:May be substituted}}.
<pre>{{substitute|both}}</pre>
{{{{ROOTPAGENAMEE}}|both}}