1.7

Table Of Contents
Note
Remote snippets inserted as shared content cannot be changed from within the Designer. Of course,
their source file can be edited outside of the Designer. When that happens, the changes will become
visible in remote snippets that are inserted as shared content.
Via a script
In addition to the drag-and-drop method, it is possible, and often useful, to insert a snippet or
part of it, using a script; for remote snippets this is normal practice. See "Loading a snippet via
a script" on page256.
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.
Creating a snippet
To turn a parts of a letter or email into a snippet for reuse in the content of a template:
1. Select the part that should be saved in a snippet.
2.
Right-click the selection, point to Snippet and click Create.
3.
Right-click the new snippet on the Resources pane in the Snippets folder and rename it.
JSON Snippets
JSON Snippets are snippets that contain pieces of JSON data instead of HTML. Just like HTML
snippets, JSON snippets are stored in the Snippets folder on the Resources pane, but their
file name should end in '.json'.
JSON Snippets cannot be inserted into the content directly, but they can be accessed via a
script using the function loadjson():
var json_data = loadjson("snippets/snippet.json");
results.html(json_data.field1);
See also: "Writing your own scripts" on page240.
Page 185