Conditionally renders a block based on whether a value evaluates to false. This behavior is the inverse of the if helper.
This built-in helper is provided by the Handlebars.Net library.
Availability
This helper is available in the Winter ’26 release of Marketing Cloud Next.
Syntax
{{#unless condition}}
<!-- Content when condition evaluates to false -->
{{else}}
<!-- Content when condition evaluates to true -->
{{/unless}}
Parameters
| Parameter | Type | Description |
|---|---|---|
condition |
Any | Required. The value to evaluate. |
Return Value
The function renders the block template if the condition evaluates to false. If an
{{else}} block is provided, it renders that block when the condition evaluates to true.
See Also
- Github: Handlebars.Net
- Handlebars Language Guide: Built-in Helpers