Difference between revisions of "Template:If"

From Avlis Wiki
Jump to navigation Jump to search
m (Added If Template to make other templates work)
 
(No difference)

Latest revision as of 13:56, 22 September 2009

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
}}