Containers Configuration
This page describes how to configure containers in Bloomreach Content. It focuses on the hst:containers section within the workspace configuration model.
For an overview of the workspace configuration and its available nodes, see Workspace configuration.
/hst:workspace:
/hst:containers:
/hst:sitemenus:
/hst:abstractpages:
/hst:pages:
/hst:components:
/hst:sitemap:
/hst:channel:
The Workspace configuration documentation covers hst:sitemenus, hst:pages, and hst:sitemap. This page explains how to configure hst:containers.
hst:containers
The Channel Editor allows webmasters to modify specific regions of a web page. These regions are called containers. Containers are editable only when they are stored in the hst:workspace. More specifically, containers are modifiable if they are configured:
- Under
hst:workspace/hst:pages - Under
hst:workspace/hst:containers
This restriction ensures that changes made at runtime through the Channel Editor remain within the workspace and do not affect configuration outside of it.
Containers that are configured outside the workspace cannot be edited through the Channel Editor. If you need to make regions of a non-workspace page (such as one maintained by a developer or bootstrap content) editable, configure those containers under hst:workspace/hst:containers and reference them from the non-workspace page.
The following example shows a relevant configuration using hst:workspace/hst:containers:
/example: /hst:pages: /home: jcr:primaryType: hst:component /main: jcr:primaryType: hst:component /content: jcr:primaryType: hst:component /container: jcr:primaryType: hst:containercomponentreference hst:referencecomponent = home/container /hst:workspace: /hst:containers: jcr:primaryType: hst:containercomponentfolder /home: jcr:primaryType: hst:containercomponentfolder /container: jcr:primaryType: hst:containercomponent /list: jcr:primaryType: hst:containeritemcomponent
This configuration introduces two node types:
-
hst:containercomponentreference
This node type requires thehst:referencecomponentproperty. The property value must be a relative path to a node of typehst:containercomponentunderhst:workspace/hst:containers.If the referenced
hst:containercomponentdoes not exist, or the path inhst:referencecomponentis incorrect, the HST model skips thehst:containercomponentreferencenode.Important:
The HST model uses the node name of thehst:containercomponentreferencenode, not the name of the referencedhst:containercomponent. For example, if the reference node is namedmycontainerbut the referenced container is namedyourcontainer, the HST model usesmycontainer. Use this name in thehst:includetag:<hst:include ref="mycontainer" />Example configuration:
/example: /hst:pages: /home: jcr:primaryType: hst:component /main: jcr:primaryType: hst:component /content: jcr:primaryType: hst:component /mycontainer: jcr:primaryType: hst:containercomponentreference hst:referencecomponent: home/yourcontainer /hst:workspace: /hst:containers: jcr:primaryType: hst:containercomponentfolder /home: jcr:primaryType: hst:containercomponentfolder /yourcontainer: jcr:primaryType: hst:containercomponent /list: jcr:primaryType: hst:containeritemcomponent -
hst:containercomponentfolder
This node type acts as a container for otherhst:containercomponentfolderorhst:containercomponentnodes.
The Compact Node Definition (CND) for these node types is:
[hst:containercomponentreference] > nt:base orderable - hst:referencecomponent (string) mandatory [hst:containercomponentfolder] > nt:base orderable + * (hst:containercomponentfolder) + * (hst:containercomponent)
Pages within the workspace can also reference containers under hst:workspace/hst:containers, but it is usually simpler to store containers directly under the corresponding page node. For example:
/example: /hst:workspace: /hst:pages: /home: jcr:primaryType: hst:component /main: jcr:primaryType: hst:component /content: jcr:primaryType: hst:component /container: jcr:primaryType: hst:containercomponent /list: jcr:primaryType: hst:containeritemcomponent
Info: For details on configuring how containers are rendered in the Channel Editor, see Channel Editor Containers.
Summary
Only containers stored in the hst:workspace are editable through the Channel Editor. You can store modifiable containers either under hst:workspace/hst:pages or under hst:workspace/hst:containers. Containers under hst:workspace/hst:containers can be referenced by non-workspace pages to provide editable regions.