2019.1

Table Of Contents
Field Type Description
['Section X'].
type "ContextType"
on page1308
The context type: PRINT, EMAIL or WEB.
Function Description
"query
(selector)"
on
page1313
Runs a query across all sections in the Print context. This function is only
available in Post Pagination Scripts, which are only applied to the Print
context. See "Post Pagination Scripts" on page843.
Example
This script checks if the output channel is EMAIL and if the context to be merged is the Print
context (which happens if the Print context is attached to an email). If this is the case, it includes
and excludes certain Print sections from the output.
if (channel == Channel.EMAIL) {
if (merge.context.type == ContextType.PRINT) {
merge.context.sections['Section 1'].enabled = false;
merge.context.sections['Section 2'].enabled = false;
merge.context.sections['Section 3'].enabled = true;
}
}
media
The media object can be used to specify, enable and position a stationery's front and back in a
Control Script (see "Control Scripts" on page828 and "Control Script API" on page1280).
Note that Media are only used in Print sections (see "Media" on page489).
The available media are listed in, and retrieved via, the template object (see "template" on
page1303), for example: var myMedia = merge.template.media.My_Media.
Page 1283