Skip to main content

Page content modules

A page's Content array contains modules associated with template objects. Each module has a BlockName identifying the object type and a BlockParseName identifying the compiled template object. A page may contain multiple modules of the same type.

{
"UserSiteId": 100,
"UserSitePageId": 101,
"Order": 0,
"BlockName": "ImageLargeModule",
"BlockParseName": "ImageLargeModule_50_hero",
"Data": "{\"Title\":\"Welcome\",\"SubTitle\":\"Find your home\"}",
"DataEdit": null,
"Filter": null,
"Options": null,
"TargetPageId": null,
"TemplateBlockAttributes": null,
"TemplateBlockAttributesObject": null
}

The example parse name is illustrative. Use the actual compiled name from the selected template; do not assume an invented name exists.

Fields​

FieldTypeDescription
UserSiteIdintegerIdentifier of the containing website.
UserSitePageIdintegerIdentifier of the page containing this module.
OrderintegerModule ordering value on the page.
BlockNamestring or nullTemplate object type, such as ImageLargeModule or DirectoryList.
BlockParseNamestring or nullCompiled template object name used to identify the particular object.
Datastring or nullJSON-encoded map of template fields and blocks to their values.
DataEditstring or nullSeparate editor-related data. Its shape and relationship to Data depend on the workflow; do not assume it is interchangeable with Data.
Filterstring or nullJSON-encoded filter data when present; its schema depends on the module.
Optionsstring or nullJSON-encoded options when present; their schema depends on the module.
TargetPageIdinteger or nullTarget page identifier field. Its use depends on the module and workflow.
TemplateBlockAttributesstring or nullJSON-encoded template block attributes when present.
TemplateBlockAttributesObjectarray or nullParsed representation of TemplateBlockAttributes; derived by the model when the string is present.

The template compiler generates parse names using the object name, template head ID and object ID when an object ID is present. Treat the name as a template reference, not as the page or website ID.

The Data string​

Data is a string in the outer JSON document. When decoded, the value from the first example is:

{
"Title": "Welcome",
"SubTitle": "Find your home"
}

The keys map to fields defined by the particular template object. Different objects, even of the same BlockName, can expose different fields. Do not assume every module has Title or SubTitle, or that every supported template field appears in every document.

A list block can appear as an array of item maps. For example, an ImageListModule may contain ImageListItem values:

{
"BlockName": "ImageListModule",
"BlockParseName": "ImageListModule_50_gallery",
"Data": "{\"Title\":\"Featured\",\"ImageListItem\":[{\"Title\":\"First item\"},{\"Title\":\"Second item\"}]}"
}

After decoding Data:

{
"Title": "Featured",
"ImageListItem": [
{ "Title": "First item" },
{ "Title": "Second item" }
]
}

See the template object syntax, custom object properties, and image list block for the corresponding template definitions. Data, Filter, or Options can be null; the examples are not a complete schema or an API request contract.