Difference between revisions of "Template:If"
CommanderC (talk | contribs) (An implementation in Lua of the #if ParserFunction) |
CommanderC (talk | contribs) |
||
| Line 1: | Line 1: | ||
| − | <includeonly>{{#invoke:ParserFunctions|If|{{{1|}}}|{{{2|}}}|{{{3|}}}}}</includeonly><noinclude>[[Category:Templates]]</noinclude> | + | <includeonly>{{#invoke:ParserFunctions|If|{{{1|}}}|{{{2|}}}|{{{3|}}}}}</includeonly><noinclude> |
| + | |||
| + | This template implements the [https://www.mediawiki.org/wiki/Help:Extension:ParserFunctions ParserFunction] #if: | ||
| + | |||
| + | <nowiki>{{</nowiki>#if: test string | value if test string is not empty | value if test string is empty (or only white space) <nowiki>}}</nowiki> | ||
| + | [[Category:Templates]]</noinclude> | ||
Latest revision as of 21:56, 18 March 2015
This template implements the ParserFunction #if:
{{#if: test string | value if test string is not empty | value if test string is empty (or only white space) }}