2018.1

Table Of Contents
Which contexts are available in the template can be queried using merge.template.contexts.
To get access to a specific context, you have to specify the ContextType (see "ContextType" on
page1099).
Field Type Description
contexts Array Array of contexts (see "context" on page1080)
available in the template. The contexts contain
the sections (see "section" on page1084).
"media" on
page1081
Array Media available to this template (see "Media" on
page408). For each of them you can specify,
enable and position the stationery's front and
back.
"properties"
on the
facing page
Properties
This object contains all default properties of the
template as well as any custom properties. (On
the menu, select File > Properties to view and
complement the file properties. See File
Properties).
Example
The following Control Script retrieves two Print sections. Then, depending on a value in the
current record, it enables one section or the other, so that only one of the two sections appears
in the output.
var printSections = merge.template.contexts.PRINT.sections;
printSections['Section EN'].enabled = false;
printSections['Section FR'].enabled = false;
if(record.fields.Language === 'FR'){
printSections['Section FR'].enabled = true;
} else {
printSections['Section EN'].enabled = true;
}
Page 1095