2022.1

Table Of Contents
l Handlebars templates can contain HTML and Handlebars expressions; see "Handlebars
templates" on page781.
The information in this topic applies to all or at least two types of snippets.
Note
Regarding styling: when a snippet is added to different sections or contexts, it is
displayed according to the section's or context's style sheet. This means that the same
content can look different depending on the styles applied to the section or context,
without changing the content.
Tip
It is possible to open and edit any external HTML or JSON file in the Designer: select File
> Open, select All files (*.*) as the file type and then select an HTML or JSON file.
Adding a snippet to the Resources
Here's how to add a snippet to the Resources of a template.
1. Before adding a snippet, import any resource files that are related to the snippet, such as
image files and CSS files, into the template file. Drag and drop the files to the
corresponding folders (Images and Stylesheets, respectively) on the Resources pane. If
you want to use external images, see "Images" on page761.
2. Drag the file that contains the snippet into the Snippets folder on the Resources pane.
If the added snippet is not UTF-8 encoded you will be asked to select its encoding. The
snippet will then be converted and saved in the template as UTF-8 encoded file.
Tip
To export a snippet from your template, drag or copy/paste it out of the Snippets folder to
a folder on the local hard drive.
Page 776