Difference between revisions of "Template:If"
From Curious Expedition 2 Wiki
m |
m |
||
Line 1: | Line 1: | ||
<includeonly>{{{1{{{1|}}}|{{{2}}}}}}<nowiki/></includeonly><noinclude> | <includeonly>{{{1{{{1|}}}|{{{2}}}}}}<nowiki/></includeonly><noinclude> | ||
− | Returns second argument if first argument is defined, empty otherwise. | + | Returns the second argument if the first argument is defined, empty otherwise. |
See [https://meta.wikimedia.org/wiki/Help:Advanced_templates#Branching_techniques_without_ParserFunctions MediaWiki Help - Advanced Templates - Branching techniques without ParserFunctions]. | See [https://meta.wikimedia.org/wiki/Help:Advanced_templates#Branching_techniques_without_ParserFunctions MediaWiki Help - Advanced Templates - Branching techniques without ParserFunctions]. |
Revision as of 10:48, 10 January 2021
Returns the second argument if the first argument is defined, empty otherwise.
See MediaWiki Help - Advanced Templates - Branching techniques without ParserFunctions.
Examples
You type | You get{{{1}}} |
---|
|-
|-
|
{{if|defined|Argument defined!}}
|
Argument defined!
|-
|-
|
{{if||Argument defined!}}
|
|}