You can define a section within a template by inserting a
contentItem
or
contentItemList
element within a property.
A content item property defines a template section by creating a placeholder for a nested content item defined by a cartridge template.
Content administrators can configure a section in Experience Manager by choosing a cartridge to insert in the section then configuring the properties of the cartridge.
To add a content item property to a template:
Only cartridge templates with a group that matches the section group are presented as options for the content administrator to choose from in Experience Manager. For example, when a content administrator inserts a cartridge in a
SecondaryContent
section, only templates of theSecondaryContent
group display in the Select Cartridge dialog box. (Recall that the cartridge template is the part of a cartridge that is exposed in Experience Manager).
The following example defines sections within a template. Note that more than one section in a template can have the same type, as long as your client application expects this kind of content.
{ "ecr:type": "template", "@group": "Page", "@description": "${template.description}", "@thumbnailUrl": "thumbnail.png", "defaultContentItem": { "@name": "Three-Column Page", -- additional elements deleted from this example -- "leftContent": [], "rightContent": [], -- additional elements deleted from this example --
A content item list allows content administrators to add an arbitrary number of items to a section and to reorder those items within the list using the Content Tree in Experience Manager.
Using a content item list allows the content administrator to add an arbitrary number of content items to sections in this page:
"typeInfo": { "headerContent": { "@propertyType": "ContentItemList", "@group": "HeaderContent" }, "leftContent": { "@propertyType": "ContentItemList", "@group": "SecondaryContent" }, "mainContent": { "@propertyType": "ContentItemList", "@group": "MainContent" }, "rightContent": { "@propertyType": "ContentItemList", "@group": "SecondaryContent" }, }
To add a content item list to a template:
Only cartridge templates with a group that matches the content item list group are presented as options for the content administrator to choose from in Experience Manager. In the above example, when a content administrator inserts a cartridge in a
rightColumn
section, only templates of theSecondaryContent
group display in the Select Cartridge dialog box.
Unlike other types of content properties, section properties are always editable; you do not need to explicitly specify an editor in the template.
In Experience Manager, content administrators can select cartridges to insert in sections either by clicking the cartridge Add button in the content detail panel or by right-clicking the section in the Content Tree. Both options bring up the cartridge selector dialog box and are enabled automatically when you define a section in the template.