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.
Creating a partial
Any Handlebars template, including remote Handlebars templates, can be used as a partial in
a Handlebars template in OLConnect.
To create a partial in an OL Connect template, simply create a Handlebars template; see
"Creating a Handlebars template" on page782.
Tip
To keep an overview you could group the partials in a sub folder of the Snippets folder on
the Resources pane.
How to register a partial
It is not mandatory to register a partial, but it can be useful, for example if you want to work with
dynamic partials. Registered partials can be referred to in Handlebars expressions and
functions by the specified name; see "Using a registered partial in a template" on the facing
page.
To register a partial, use the following function in a script: Handlebars.registerPartial
('partialName', 'template') (for details see: "Handlebars API" on page990).
For example, this line of code registers a template (clauses.hbs) as a partial with the name
'clauses':
Handlebars.registerPartial('clauses', 'snippets/partials/clauses.hbs');
Page 987