Difference between revisions of "Template:If"

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

Revision as of 20:20, 28 September 2010

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