2022.1

Table Of Contents
Value Description
THUMBNAIL The merge request is for generating a template
preview.
Example
The following Control Script selects different sections for Print output and for Email with the
Print context attached to it.
var printSections = merge.template.contexts.PRINT.sections;
if(merge.channel === Channel.EMAIL){
printSections['Section 1'].enabled = false;
printSections['Section 2'].enabled = true;
}
if(merge.channel === Channel.PRINT){
printSections['Section 1'].enabled = true;
printSections['Section 2'].enabled = false;
}
ContextType
ContextType is an enumeration for the context types.
The type of the context that is going to be merged next can be retrieved via
merge.context.type.
The context type needs to be specified when retrieving a section with
merge.template.contexts.ContextType.sections["section name"], for example
merge.template.contexts.PRINT.sections["Section EN"].
Value Description
HTML_EMAIL The context is the Email context.
PRINT The context is the Print context.
WEB The context is the Web context.
Page 1501