Template:Ifsubst: Difference between revisions

From Roses, Tulips, & Liberty
Content added Content deleted
(+vi: (noinclude))
m (1 revision imported from wikipedia:Template:Ifsubst)
 
(14 intermediate revisions by 9 users not shown)
Line 1: Line 1:
{{ safesubst:<noinclude/>#if:{{{demo|}}}
{{#{{<includeonly>subst:</includeonly>#if:||i}}f:{{<include{{<includeonly>subst:</includeonly>#if:||only}}>subst:</include{{<includeonly>subst:</includeonly>#if:||only}}>Empty template|.}}|<!--else-->{{{else|{{{2|}}}}}}|<!--then-->{{{then|{{{1|}}}}}}}}<noinclude><pre>{{subst:ifsubst|then|else}}</pre>
|{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no

|{{{no|{{{2|}}}}}}
Add the above code to a template of yours to give it <code>ifsubst</code> functionality. If your template is substituted, your "then" text will appear, else your "else" text. Note that this template in itself must be substituted into your new one.
|{{{yes|{{{1|}}}}}}

}}
[[Category:Wikipedia special effects templates|Ifsubst]]
|{{ safesubst:<noinclude/>#ifeq:{{ safesubst:<noinclude/>NAMESPACE}}|{{NAMESPACE}}

|{{{no|{{{2|}}}}}}
[[vi:Tiêu bản:Ifsubst]]
|{{{yes|{{{1|}}}}}}
}}}}<noinclude>
{{Documentation}}
</noinclude>
</noinclude>

Latest revision as of 03:22, 9 February 2023