1.6

Table Of Contents
Field Type Description
on
page487
be used to find out which contexts are available in the template,
using merge.template.contexts (see "context" on
page478) and to manipulate the sections in those contexts
(see "section" below).
section
The section object can be used to query and modify how the section (and the related context)
will be outputted. It is one of the most important objects in Control Scripts (see "Control Scripts"
on page239 and "Control Script API" on page476).
Retrieving a section
A section can be retrieved using merge.template.contexts.ContextType.sections["section
name"], for example: merge.template.contexts.PRINT.sections["Section EN"].
A section can also be retrieved via merge.context.sections['section name']. Remember,
however, that when several contexts need to be merged (for example, when the Print context is
attached to an email), the script needs to check if the current context is of the type that contains
the desired section (for example: if (merge.context.type == ContextType.PRINT) {}). When
sections in different contexts have the same name, it is safer to use
merge.template.contexts.ContextType.sections["section name"].
Fields
Field Type Description
background String Print sections only. Used to set a PDF background on
a Print section. See "Control Script: Setting a Print
section's background" on page246 and
"BackgroundResource" on page488.
enabled boolean Enables or disables this section for output (see
"Examples" on page483). Note that even if a section is
disabled, the part and restartPageNumber fields
are still effective to define the parts division and page
Page 480