Skip to main content

Site-wide components

SiteComponents is a collection of components associated with the website rather than with a single page's Content. Menu and footer are examples of site-wide components. The collection is separate from the website's top-level MenuData and FooterData fields. A collection entry can be null when the corresponding component is absent.

{
"Id": 201,
"UserSiteId": 100,
"BlockName": "Menu",
"BlockParseName": "Menu_50_main",
"Data": "{}",
"DataEdit": null,
"Options": null,
"TemplateBlockAttributes": null,
"TemplateBlockAttributesObject": null
}

This example is illustrative: the parse name and Data fields must correspond to the actual template component. It does not define an API request.

FieldTypeDescription
IdintegerSite-component identifier.
UserSiteIdintegerIdentifier of the website containing the component.
BlockNamestringTemplate component type, such as Menu or Footer.
BlockParseNamestring or nullCompiled name of the associated template component.
Datastring or nullJSON-encoded component data, whose fields depend on the template.
DataEditstring or nullSeparate editor-related component data. Its exact relationship to Data depends on the workflow.
Optionsstring or nullComponent options; the inner format is not specified here.
TemplateBlockAttributesstring or nullJSON-encoded template block attributes when present.
TemplateBlockAttributesObjectarray or nullParsed representation of TemplateBlockAttributes; derived by the model.

Like page-module Data, Data here is a string in the outer JSON, not an embedded object. A site component has an Id, but unlike a page content module it does not have UserSitePageId or Order in this model.

See Menu, Footer, and Page content modules.