2022.1

Table Of Contents
This is an example:
let html = ''
let policydata = record.tables.Policy
for (var i=0; i < policydata.length; i++) {
let templateName = 'snippets/' + policydata[i].fields
['snippetName'] + '.hbs'
html += Handlebars.render( templateName, policydata[i] )
}
results.replaceWith( html );
Styling and formatting
In the Designer you have everything at hand to make your templates look good: colors, fonts
and all the tools to position, align and embellish elements in your designs. This topic informs
about the ways to style a template.
Local formatting versus style sheets
There are in general two ways to style elements:
l Using local formatting. Local formatting means styling an element directly, using a
toolbar button or one of the formatting dialogs.
l Using Cascading Style Sheets (CSS). Style sheets can determine the appearance of
individual elements, as well as the appearance of elements that have the same class or
HTML tag.
Whether applied through style sheets or through local formatting, behind the scenes all layout
properties in the Designer are CSS properties. When you format an element locally, an inline
style rule is added to the element.
Note that where local formatting conflicts with a formatting rule for the same element in one of
the style sheets, the local formatting rule gets priority; the rule in the style sheet will be ignored.
It is highly recommended to use style sheets in templates right from the start. Even more so if
the communications are going to be output to different output channels, or if they consist of
different sections (for example, a covering letter followed by a policy). Using CSS with
templates allows a consistent look and feel to be applied. A style sheet can change the look of
multiple elements, making it unnecessary to format each and every element in the template,
Page 785