2018.2

Table Of Contents
Field Type Description
"section"
on
page1196
Section
In Standard Scripts, this object defines the section that is being
merged.
Note! In Control Scripts, merge.section is only available when
the output channel is WEB. To make sure that it is defined, use
the following statement: if (merge.channel == Channel.WEB
&& merge.context.type == ContextType.WEB) { ... }.
To retrieve any section in a Control Script, use:
merge.template.contexts.ContextType.Section['Section
name']; (for example:
merge.template.contexts.PRINT.sections["Section EN"]).
In Post Pagination Scripts, only Print sections are available.
"template"
on
page1182
Template This object contains the template and all of its contexts. It can
be used to find out which contexts are available in the
template, using merge.template.contexts (see "context"
on page1190) and to manipulate the sections in those
contexts (see "section" on page1196).
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 page751 and "Control Script API" on page1162).
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
Page 1168