Difference between revisions of "Template:If"

From SimsWiki
Jump to: navigation, search
m (1 revision)
Line 16: Line 16:
 
}}
 
}}
 
</pre></noinclude>
 
</pre></noinclude>
 +
<noinclude>[[Category: Templates]]</noinclude>

Revision as of 12:06, 27 October 2012

Usage

{{if
  |test=VARIABLE_OR_PARAMETER_TO_TEST
  |then=code if 'test' is not empty
  |else=code if 'test' is empty
}}

Parameter else is optional. So you may also do:

{{if
  |test=VARIABLE_OR_PARAMETER_TO_TEST
  |then=code if 'test' is not empty
}}
Personal tools
Namespaces

Variants
Actions
Navigation
game select
Toolbox