2022.1

Table Of Contents
Note
The information in this Online Help focuses on the implementation of Handlebars in OL
Connect. For general information about Handlebars and how to use it, see the following
web sites: https://handlebarsjs.com/ and https://devdocs.io/handlebars.
Handlebars expressions
Note
The information in this Online Help focuses on the implementation of Handlebars in OL
Connect. For general information about Handlebars and how to use it, see the following
web sites: https://handlebarsjs.com/ and https://devdocs.io/handlebars.
Data in expressions
A handlebars expression is a {{, some contents, followed by a }}.
For example:
<p>Hello {{firstname}} {{lastname}}!</p>
In its most simple form the contents of the expression refer to a data field. They will be replaced
with the value of that field if it exists in the data that is passed to the template (see "Render the
Handlebars template" on page288).
You can simply write the field or key name in the expression. A whitespace before and after the
field or key name is accepted, e.g. {{fullName }}.
Another, quick way to insert a simple expression is to drag and drop the field from the Data
Model in the Handlebars template.
When you drag and drop a field into a Handlebars template, a call to a function that formats the
value may be added automatically. This depends on the field type.
For example, dragging a currency field will produce: {{currency fieldName}} which outputs a
number formatted as an amount of money.
You can remove the function or change it (see "Formatting values" on the next page).
Page 449