2022.2

Table Of Contents
Example
Thisfollowingcodewouldaddapropertycalled'myProperty'withthevalue'myvalue':
contentitem.properties.myProperty = 'myvalue';
Youcanreplace'myProperty'and'myvalue'withwhatevernameandvaluebestsuitstheusecase.
Ifthenameofthepropertycontainsaspaceyou'llneedtoputitbetweenbracketsandquotationmarks:
contentitem.properties['name with spaces'] = 'value';
Ifthevalueisanumberyoudon'tneedtoputitbetweenquotationmarks:
contentitem.properties.custom_property = 123;
context
InaControlScript,thecontextobjectrepresentsonecontextinthetemplate.
Whichcontextsareavailableinthetemplatecanbequeriedusingmerge.template.contexts.
Thecontextbeingmergedcanbequeriedusingmerge.context.
Field Type Description
sections
Array Arrayofsections(see"section"onpage1305)insideaparticularcontextdefinedinthetemplate.
Note: Whenusingmerge.context.sectionskeepinmindthatforexample'SectionX'
mightonlyexistinyourPrintcontext,sousingmerge.context.sections['Section X']
withoutenclosingitintheifstatementif (merge.context.type == Con-
textType.PRINT) {}willyieldanerrorwhenthescriptrunsforothercontexts.
Alternatively,usethetemplate objecttoaccessaspecificcontext:merge.tem-
plate.contexts.PRINT.sections['Section X'].
type
"ContextType"on
page1295
Thecontexttype:PRINT,EMAILorWEB.
Function Description
"query(selector)"on
thefacingpage
RunsaqueryacrossallsectionsinthePrintcontext.ThisfunctionisonlyavailableinPostPaginationScripts,whichareonly
appliedtothePrintcontext.See"PostPaginationScripts"onpage850.
Page 1299