Difference between revisions of "Template:If"
From SimsWiki
Line 16: | Line 16: | ||
}} | }} | ||
</pre></noinclude> | </pre></noinclude> | ||
− | |||
− |
Revision as of 23:10, 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 }}