Web Template Handlebars

With the Handlebars Templates Gear enabled, HTML received with a web campaign is rendered using Handlebars templated HTML.

The preceding link to the external Handlebars site is for information purposes only. Some of the code structures and functions of the Handlebars templating language are incorporated as part of the Personalization module of the Salesforce Interactions SDK when the Handlebars Templates Gear is installed and enabled. The Handlebars Templates Gear is installed with Marketing Cloud Personalization and enabled by default, but a Personalization administrator can disable or enable this Gear.

Handlebars is a simple HTML templating language that uses a template and an input object to generate HTML. A Handlebars expression is an opening double-brace {{, some contents, followed by a closing double-brace }}. The following is an example of a simple Handlebars expression.

In creating templates, developers enter Handlebars template code in the template editor's Handlebars tab. On executing a Handlebars template within a Personalization web template, each Handlebars expression is replaced with values from the specified input object. In Personalization web templates, the template variables in the Handlebars expressions are populated by the Web Template Context provided by the Client JavaScript objects specified in the Clientside Code tab.