If
Conditionally renders an element. Applies to:text, meta, channel, group, action, image.
Examples
Ref
Names an element for reference by other elements. Referenced elements provide access to:- Their properties
- A
visibleproperty (trueif rendered,falseotherwise)
text, meta, channel, group, action, image.
Example
Loop
Renders an element multiple times based on an iterable data source.loopmust evaluate to an iterable data source$.itemrefers to the current item in the iteration$.indexprovides the current index
cWhen using This will output “Item 1”, “Item 2”, etc., instead of starting from zero.
$.index in loops, you can easily display a 1-based item number by using the add handlebar helper:text, channel, group, action, image.
Example:
Channels
Selectively renders an element based on the current channel. Valid channels:email, push, direct_message, sms, or provider channels like slack.
Applies to: text, meta, channel, group, action, image.