1.5

Table Of Contents
between the Scripts pane and any location on the computer.
Note
Scripts included on the Scripts pane are completely distinct from the JavaScript resources found in
the "Resources Pane" on page634 (see "Using JavaScript" on page346). Think of scripts as
server-side in the sense that they are executed through the Connect modules (Server and Content
Creation especially). Scripts have access to the whole PlanetPress Connect JavaScript API (see
"Designer Scripts API" on page729), such as the record object. JavaScript resources, on the
other hand, are only executed after the content creation is done, generally in a browser.
Note
The scripts in the Scripts pane are always executed top-to-bottom. They can be dragged up or down
in the pane to change their order of execution. For example, content loading scripts (snippets with
variable data, for instance) must come before scripts that replace data within that loaded contents.
Buttons
l
Import...: Click to open a standard Open dialog to import a script. The script must have
the .OL-script extension.
l
Export...: Click to open a standard Save As dialog to save the currently selected scripts to
disk. These scripts can be re-used in other templates. If more than one script is selected,
they are all saved to a single file. If some scripts are inside folders, this folder structure is
kept and will be restored when the scripts are imported.
l
New: Displays a drop-down that shows the following options:
l
Script: Adds a new empty basic script.
l
Text Script: The default script that is created when adding variable data to a
template. See "Variable Data" on page497.
l
Dynamic Image script: Provided that its selector refers to an image, this script
dynamically changes the image for each record. See "Dynamic Images" on
page508.
l
Email scripts: Email scripts define the sender, recipients, subject etc. of the email
that is sent, and the PDF password. See "Email header settings" on page320.
Page 639