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 non-empty; returns empty otherwise.  | Returns the second argument if the first argument is non-empty; returns empty otherwise.  | ||
| − | |||
| − | |||
{{examples|  | {{examples|  | ||
| Line 8: | Line 6: | ||
{{example3|if||Argument is non-empty}}  | {{example3|if||Argument is non-empty}}  | ||
}}  | }}  | ||
| + | |||
| + | == References ==  | ||
| + | * [https://meta.wikimedia.org/wiki/Help:Advanced_templates#Branching_techniques_without_ParserFunctions WikiMedia Help - Advanced Templates - Branching techniques without ParserFunctions]  | ||
[[Category:Text templates]]  | [[Category:Text templates]]  | ||
Revision as of 03:33, 11 January 2021
Returns the second argument if the first argument is non-empty; returns empty otherwise.
Examples
| You type | You get | 
|---|---|
| 
 
  | 
 Argument is non-empty  | 
| 
 
  | 
 
  |