Handlebars with
Handlebars with: changes the block context to a specified object so properties can be accessed directly.
Next
Runtime verified
Test scripts included
Changes the block context to a specified object so properties can be accessed directly.
Syntax
{{#with object}}
…
{{/with}}
Returns string.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
object |
object | Yes | The object to use as the block context. |
Example
Tested in a Marketing Cloud Next email on 2026-11-22:
{{#with (hash name="Ana")}}{{name}}{{/with}}rendersAna, as documented.
Show Next test script
Marketing Cloud Next
Works as documented
Every tested call rendered the documented result. Tested 2026-11-22 by rendering in a Marketing Cloud Next email.