2022.1

Table Of Contents
Example
This following code would add a property called 'myProperty' with the value 'myvalue':
contentitem.properties.myProperty = 'myvalue';
You can replace 'myProperty' and 'myvalue' with whatever name and value best suits the use
case.
If the name of the property contains a space you'll need to put it between brackets and
quotation marks:
contentitem.properties['name with spaces'] = 'value';
If the value is a number you don't need to put it between quotation marks:
contentitem.properties.custom_property = 123;
context
In a Control Script, the context object represents one context in the template.
Which contexts are available in the template can be queried using merge.template.contexts.
The context being merged can be queried using merge.context.
Field Type Description
sections Array
Array of sections (see "section" on page1515) inside a
particular context defined in the template.
Note: When using merge.context.sections keep in
mind that for example 'Section X' might only exist in
your Print context, so using merge.context.sections
['Section X'] without enclosing it in the if statement
if (merge.context.type == ContextType.PRINT) {}
will yield an error when the script runs for other
contexts.
Alternatively, use the template object to access a
specific context:
merge.template.contexts.PRINT.sections['Section
Page 1506