represents an element of a template object that inserts tclause if the condition evaluates to True.

inserts fclause if the condition does not evaluate to True.

Details and OptionsDetails and Options

  • condition can be either a TemplateSlot or TemplateExpression.
  • The tclause is used when condition === True.
  • If an fclause is not provided, the value Sequence[] is used instead.
  • In an XML template, TemplateIf can be indicated using <wolfram:condition>...</wolfram:condition>. Multiple conditions can be nested using <wolfram:switch><wolfram:condition>...</wolfram:condition>...<wolfram:else>...</wolfram:else></wolfram:switch>.
  • TemplateIf has the option InsertionFunction, with default setting Inherited, that specifies how the content of each template slot should be formatted before inserting it.
Introduced in 2014