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 the second argument if the first argument is defined, empty otherwise.
+
Returns the second argument if the first argument is non-empty; returns empty otherwise.
  
 
See [https://meta.wikimedia.org/wiki/Help:Advanced_templates#Branching_techniques_without_ParserFunctions WikiMedia 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}}
 
|-
 
{{example3|if|defined|Argument defined!}}
 
|-
 
{{example3|if||Argument defined!}}
 
|}
 
  
 
[[Category:Text templates]]
 
[[Category:Text templates]]

Revision as of 19:25, 10 January 2021

Returns the second argument if the first argument is non-empty; returns empty otherwise.

See WikiMedia Help - Advanced Templates - Branching techniques without ParserFunctions.