<tml:[All tags] if ="itemexpression">
If the (any) condition in the if Item-Expression is false the tag is not rendered.
The "unless" expression has priority over the "if" expression. When both are present and evaluate true then the tag is cancelled.
Boolean item expressionA simple expression syntax to use WebTML items for evaluating a boolean result. Consisting of:
- Item term: Just anything that is valid in this.item() as item name, like names of content items, WebTML variables, Renderer/Controller property expressions
- Boolean Operators: & being and, | being or, between those item terms. There may be only one type of boolean operator on one expression, so "a | b", "a & b & c" is valid, "a | b & c" is invalid.
- Brackets to form sub expressions, where again a single boolean operator can be used, differing from the one on the main expression: "(a | b) & c"
- Exclamation mark operators to negate either item expressions or sub expressions: "!a", "!(a & b)"
Every item term is evaluated for its boolean value by the rules of TMLContext.isTrue(). Then the boolean values are combined in the ways determined by operators to form a result value.
<tml:input name="product" if="products_available"/>