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