2022.2

Table Of Contents
and"ControlScriptAPI"onpage1271).
Retrievingasection
Asectioncanberetrievedusingmerge.template.contexts.ContextType.sections["sec-
tion name"],forexample:merge.template.contexts.PRINT.sections["Section EN"].
Asectioncanalsoberetrievedviamerge.context.sections['section name'].Remember,
however,thatwhenseveralcontextsneedtobemerged(forexample,whenthePrintcontextis
attachedtoanemail),thescriptneedstocheckifthecurrentcontextisofthetypethatcontainsthe
desiredsection(forexample:if (merge.context.type == ContextType.PRINT) {}).When
sectionsindifferentcontextshavethesamename,itissafertousemerge.tem-
plate.contexts.ContextType.sections["section name"].
Fields
Field Type Description
"background"on
page1286
Background
Print sections only. Used to set a PDF background on a Print section. See
"ControlScript:SettingaPrintsection'sbackground"onpage845 and "Back-
groundResource"onpage1294.
enabled
Boolean Enablesordisablesthissectionforoutput(see"Examples"onpage1308).NotethatevenifaPrint
sectionisdisabled,thepartandrestartPageNumberfieldsarestilleffectivetodefinetheparts
divisionandpagenumberingovermultiplesectionswhenapplicable.
Thedefaultenabledstateforsections(beforeanycontrolscriptruns)isasfollows:
l
ForWebchannelrequests,therequestedWebsectionisenabledbydefault.Itis
possibletoredirecttoanothersectionbydisablingtherequestedsectionand
enablinganothersection.
l
ForEmailchannelrequestsontheWebcontext,onlythedefaultsectionisenabled
bydefault.Itispossibletoenabledifferentormultiplesections,tocontrolwhichsec-
tionswillbeattachedtotheemail.
l
ForEmailchannelrequestsonthePrintcontextallPrintsectionsareenabledby
default.Itispossibletoenabledifferentormultiplesectionstocontrolwhichsec-
tionswillbeattachedtotheemail.
l
ForEmailchannelrequests,therequestedsectionisenabledbydefault.Itispos-
sibletooutputanothersectionbydisablingtherequestedsectionandenabling
anothersection.
l
ForPrintchannelrequestsonthePrintcontextallsectionsareenabledbydefault.
Itispossibletoenabledifferentormultiplesectionstocontrolwhichsectionswillbe
outputted.
headers
String DEPRECATED. Use the addHeader() function instead.
Email sections only.Usedtosetcustomemailheaders.
Page 1306