Template:Ifsubst: Difference between revisions

m
1 revision imported from wikipedia:Template:Ifsubst
(fix)
m (1 revision imported from wikipedia:Template:Ifsubst)
 
(9 intermediate revisions by 6 users not shown)
Line 1:
{{ safesubst:<noinclude/>#if:{{{demo|}}}
{{ {{{|safesubst:}}}#ifeq:{{ {{{|safesubst:}}}NAMESPACE}}|{{NAMESPACE}}|{{{2|}}}|{{{1|}}} }}<noinclude>
|{{ safesubst:<noinclude/>#ifeq:{{{demo}}} |no
{{Documentation|content=
|{{{no|{{{2|}}}}}}
 
|{{{yes|{{{1|}}}}}}
===Usage===
Meta template that returns the first parameter if evaluated during substitution, and the second parameter if evaluated during transclusion.<br>Note that this template must be used in [[meta:Help:Safesubst|safesubst]] mode to work properly:
 
:<code><nowiki>{{ {{{|safesubst:}}}ifsubst| yes | no }}</nowiki></code>
 
<!--Categories-->
[[Category:Wikipedia metatemplates|{{PAGENAME}}]]
 
}}
|{{ {{{|safesubst:}}}<noinclude/>#ifeq:{{ {{{|safesubst:}}}<noinclude/>NAMESPACE}}|{{NAMESPACE}}|{{{2|}}}|{{{1|}}} }}<noinclude>
|{{{no|{{{2|}}}}}}
|{{{yes|{{{1|}}}}}}
}}}}<noinclude>
{{Documentation|content=}}
</noinclude>
rtl-contributors
1,630

edits