2022.1

Table Of Contents
Tip
As a rule of thumb, put as much content in the .hbs file as possible and let helpers
generate as little content as possible.
Partials
Partials are normal Handlebars templates that may be called directly by other templates. This
topic explains how to work with Handlebars partials in OLConnect.
Information about Handlebars templates in OL Connect can be found in the topics "Handlebars
templates" on page287.
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288.
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 next page.
Page 457