Template:If: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
No edit summary |
||
(3 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#ifeq:{{{1}}}|eq|1|2}}|{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#ifeq:{{{2}}}|{{{3}}}|1|2}}|{{{4|}}}|{{{5|}}}}}|{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#if{{{1}}}:{{{2}}}|1|2}}|{{{3}}}|{{{4|}}}}}}}<noinclude> | <includeonly>{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#ifeq:{{{1}}}|eq|1|2}}|{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#ifeq:{{{2}}}|{{{3}}}|1|2}}|{{{4|}}}|{{{5|}}}}}|{{ {{{|safesubst:}}}p{{ {{{|safesubst:}}}#if{{{1}}}:{{{2}}}|1|2}}|{{{3}}}|{{{4|}}}}}}}</includeonly><noinclude> | ||
See [https://www.mediawiki.org/wiki/Template:If this page] for usage. | See [https://www.mediawiki.org/wiki/Template:If this page] for usage. | ||
In many cases you may be able to use the basic #if parser function instead: | |||
:<nowiki>{{#if:test string|value if test string is not empty|value if test string is empty (or only white space)}}</nowiki> | |||
:→ {{#if:test string|value if test string is not empty|value if test string is empty (or only white space)}} | |||
[[category:templates]]</noinclude> | [[category:templates]]</noinclude> |
Revision as of 17:12, 26 May 2021
See this page for usage.
In many cases you may be able to use the basic #if parser function instead:
- {{#if:test string|value if test string is not empty|value if test string is empty (or only white space)}}
- → value if test string is not empty