Difference between revisions of "Template:If"
From Curious Expedition 2 Wiki
m  | 
				m  | 
				||
| (2 intermediate revisions by the same user not shown) | |||
| Line 2: | Line 2: | ||
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|  | |
| + | {{example3|if|argument|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]]  | ||
Latest revision as of 19:54, 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  | 
| 
 
  | 
 
  |