Blocks Deprecated
Deprecated: use the web blocks for new pages This block belongs to state pages and UI components. Existing pages keep running, but new pages should use the web blocks. See Web Pages and the migration guide.
if
This block is part of the state ui group and was last modified in core v10.4.28.
if v10.4.28 Allows you to use different state UIs based on your given condition.
In pins 3
- on true
staterequiredUI shown when condition is
true - on false
staterequiredUI shown when condition is
false - boolean
conditionrequired
Out pins 1
- UI
stateReturns the element to the frontend state.
branch |
condition |
A typical wiring for if: div feeds the then pin; translate key feeds the else pin; is not empty feeds the condition pin; the state out pin feeds div.
Commonly used with
In production blueprints, this block is most often wired together with:
- div: wired in both directions with this block. Creates a dynamic and customizable div element on your web page.
- translate key: feeds into this block. Translates a given key and builds DOM nodes from the HTML within these keys.
- is not empty: feeds into this block. checks if the value is filled (not empty).
- send email with template: feeds into this block. sends a single email with a template.
- get key: feeds into this block. Get given key from the current UI state.
Used in these guides
These documentation pages use or explain this block:
Version history
Introduced in v10.4.28.
Back to
state ui Return to the main group to view all sub-groups Back to state conditions Return to the group to view all blocks within this group 