Action @IF
Removes or displays the content that follows this action based on a condition.
Should be followed by some content, then a @ENDIF action to mark the end of the content affected by the @IF.
Usage
Parameters
| condition |
(Required) The condition to evaluate |
Examples
More information
The examples spread the content and the commands on multiple lines to make it easier to read. This is not required.
A @IF can be placed in the middle of a paragraph if you need it.
Two other actions interact with @IF and @ENDIF: @ELSE and @ELSEIF.
Unlike the IF function, this @IF action only receives a condition. The content that follows the action
(until a @ELSE, @ELSEIF or @ENDIF) is used as if_true value. If there is a @ELSE or @ELSEIF action, the content
that follows it is used as if_false value.
You can nest @IF…@ENDIF within another @IF…@ENDIF. So if the outer @IF’s condition hides the content, the inner
@IF will be ignored.
A more in-depth explanation for using @IF is available in the explanations: Clarifying @IF.