2022.1

Table Of Contents
These can be used as expression (returns the result). For example:
<p>Recurs every month: {{eq 'Monthly' recurrence}}</p>
They can also be used in sub expressions, for example of a block helper:
<p> {{#if (eq 'Monthly' recurrence)}} Recurs every month {{/if}} </p>
Adding custom helpers
In both Handlebars and OL Connect, a number of helpers are predefined, but you can also
create your own helpers using Handlebars.registerHelper(). See the Handlebars guide:
https://handlebarsjs.com/guide/#custom-helpers.
Tip
Define any helpers in a Control Script. Control Scripts are executed first. See "Control
Scripts" on page954.
Note
The blockHelperMissing and helperMissing hooks are not implemented in OL Connect.
Passing options.hash, options.helpers and options.partials arguments to helpers is
not supported in OL Connect. (options.data, options.fn and options.inverse are
supported.)
Registering multiple helpers with a single call is not supported in OLConnect.
Examples of custom helpers
Date
The following code registers a function that returns the current date.
Handlebars.registerHelper('now', function() { return new Date();
});
After the helper is registered, the expression {{dateLong now}} in a Handlebars template will
return the current date, formatted as a long date, e.g. February 23, 2022.
Page 985