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:

  1. Under hst:workspace/hst:pages
  2. 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:

  1. hst:containercomponentreference
    This node type requires the hst:referencecomponent property. The property value must be a relative path to a node of type hst:containercomponent under hst:workspace/hst:containers.

    If the referenced hst:containercomponent does not exist, or the path in hst:referencecomponent is incorrect, the HST model skips the hst:containercomponentreference node.

    Important:
    The HST model uses the node name of the hst:containercomponentreference node, not the name of the referenced hst:containercomponent. For example, if the reference node is named mycontainer but the referenced container is named yourcontainer, the HST model uses mycontainer. Use this name in the hst:include tag:

    <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
  2. hst:containercomponentfolder
    This node type acts as a container for other hst:containercomponentfolder or hst:containercomponent nodes.

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.

Share Feedback
Page: /build/hst-configuration/core-configuration/containers-configuration
Section: Build
Category *