2022.2

Table Of Contents
Whichcontextsareavailableinthetemplatecanbequeriedusingmerge.template.contexts.To
getaccesstoaspecificcontext,youhavetospecifytheContextType(see"ContextType"on
page1295).
Field Type Description
contexts Array Arrayofcontexts(see"context"onpage1299)availableinthetemplate.Thecontexts
containthesections(see"section"onpage1305).
images Array Thelistofimageresources(see"ImageResource"onpage1296)includedinthe
template.
masterpages Array ArrayofMasterPages(see"masterpage"onpage1274)availableinthetemplate.
"media"on
page1276
Array Mediaavailabletothistemplate(see"Media"onpage465).Foreachofthemyoucan
specify,enableandpositionthestationery'sfrontandback.
"properties"on
page1293
Properties Thisobjectcontainsalldefaultpropertiesofthetemplateaswellasanycustom
properties.(Onthemenu,selectFile > Propertiestoviewandcomplementthe
fileproperties.See"FilePropertiesdialog"onpage883).
Example
ThefollowingControlScriptretrievestwoPrintsections.Then,dependingonavalueinthecurrent
record,itenablesonesectionortheother,sothatonlyoneofthetwosectionsappearsintheoutput.
var printSections = merge.template.contexts.PRINT.sections;
printSections['Section EN'].enabled = false;
printSections['Section FR'].enabled = false;
if(record.fields.Language === 'FR'){
printSections['Section FR'].enabled = true;
} else {
printSections['Section EN'].enabled = true;
}
properties
Thepropertiesobjectinsidethetemplateobject(see"template"onpage1292)containsall
defaultpropertiesofthetemplatefileaswellasanycustomproperties.
Toviewandcomplementthefileproperties,selectFile > Propertiesonthemenu.See"FileProperties
dialog"onpage883.
Followingarethedefaultproperties.
Page 1190