2022.2

Table Of Contents
merge
InControlScripts,therootlevelinstanceoftheobjectmergeistheentrypointfromwhereyoucan
queryandchangethewaycontextsaremerged.Itgivesaccesstothetemplatewithallitscontextsand
sections.
FormoreinformationaboutControlScripts,see"ControlScripts"onpage398and"ControlScriptAPI"
onpage815.
SomeoftheobjectsarealsousefulinPostPaginationScripts;see"PostPaginationScripts"on
page410and"PostPaginationScriptAPI"onpage840.
Forsamplescripts,followthelinkstotherespectiveobjects.
Field Type Description
channel
"Channel"on
page837
Thefinaloutputchannel:EMAIL,PRINTorWEB.Thechanneldoesn'tchangewhentheoutputconsistsofdif-
ferentcontexts.Whengeneratinganemail,forexample,thechannelisEMAIL,evenwhenmergingthePrint
contexttoattachittotheemail.
"context"on
page842
Context Thecontextrenderedbythismergerun.Ifforonerecord,differentcontextsneedtobeoutput(forexample,
whenthePrintcontextisattachedtoanemail)arecordismergedmultipletimes:oncepercontext.Per
mergerun,merge.contextshowswithwhichcontexttherecordismerged.
pagination
"Pagination"on
page857
ContainsthetotalpagecountandsheetcountofallsectionsinthePrintcontextafterpagination.
"section"on
page848
Section InStandardScripts,thisobjectdefinesthesectionthatisbeingmerged.
Note!InControlScripts,merge.sectionisnotavailable.
ToretrieveanysectioninaControlScript,use:merge.tem-
plate.contexts.ContextType.Section['Section name'];(forexample:merge.tem-
plate.contexts.PRINT.sections["Section EN"]).
InPostPaginationScripts,onlyPrintsectionsareavailable.
"template"on
page835
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page842)andtomanipulatethesec-
tionsinthosecontexts(see"section"onpage848).
template
Thetemplateobjectrepresentsthetemplatewithallitscontextsandsections.Itisusedfrequentlyin
ControlScripts(see"ControlScripts"onpage398and"ControlScriptAPI"onpage815)butitcanalso
beusedinStandardScripts.
Itisretrievedviathemergeobject:merge.template(see"merge"onpage856).
Whichcontextsareavailableinthetemplatecanbequeriedusingmerge.template.contexts.To
getaccesstoaspecificcontext,youhavetospecifytheContextType(see"ContextType"on
page838).
Page 733