1.4

Snippets
Snippets are pieces of content that can be re-used within the same template, in all contexts and
sections. Snippets can contain any contents that a section can have, such as text, images,
variable data, dynamic tables, etc. They are often very useful to personalize content, especially
in combination with variable data and scripts. See "Snippets" on page 396 and "Loading a
snippet via a script" on page 386.
Scripts
Self-made scripts
As soon as you want to do more than what can be done with the available (Text, Conditional)
Script Wizards, self-made scripts are the solution. You could, for example, combine data of two
or more data fields in a condition for conditional text. Or you could load a part of a snippet
depending on the value of a data field. With a self-made script you can achieve anything that
can be done by any of the Script Wizards, and much more. For an introduction on this, see
"Write your own scripts" on page 376.
Control Scripts
Control Scripts are scripts that affect the output of a template per record as a whole, instead of
parts of the content. They are executed before the data is merged and can be used to control
how different sections of the context are handled when the output is generated.
With a control script you can, among other things:
l Conditionally omit sections from print output
l Dynamically set the background image of a section
l Make the page numbering continue over all print sections
l Select one print section as PDF attachment if the output is to be emailed, and another
print section if the output is to be printed
l Output one web page or another, based on the value of a data field
You need some knowledge of JavaScript to edit Control Scripts, just as for any other self-made
scripts, because there is no Control Script Wizard; see "Write your own scripts" on page 376.
See "Control Scripts" on page 388.
Page 327