2022.1

Table Of Contents
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 page267.
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.
Remote snippets
A remote snippet is either an HTML or JSON file that is not located within your template file but
is hosted on a Content Management System or other external location.
To add a remote snippet:
1. Right-click the Snippets folder on the Resources pane, and click New Snippet >
Remote HTML file or Remote JSON file.
2. Enter a name for the file as it appears in the Snippets folder. This name is shown in the
Snippets folder with the .rhtml file extension for HTML, or .rjson for a JSON file.
3. Enter the URL for the remote resource. This must be a full URL, including the http:// or
https:// prefix, domain name, path and file name.
Note
Remote snippets may contain other resources, such as images. There is one limitation
though: only absolute paths are supported inside remote snippets. Images and other
resources referred to with a relative path (for example: images/img.gif) or root-relative
path (any path starting with a slash, for example: /base/images/img.gif) won't be available
in the template.
Page 282