Container component written in HTL.
- Configurable layout type.
- Configurable background image and background color:
- Background images and colors can be enabled through policy configuration.
- Color swatches for background color can be defined through policy configuration.
- Background color can be restricted to only allow swatches through policy configuration.
- Configurable HTML ID attribute.
- Allowed components can be configured through policy configuration.
- Style System support.
The Container component uses the com.adobe.cq.wcm.core.components.models.LayoutContainer
Sling model as its Use-object.
The following configuration properties are used:
./layout
- defines the layout type, eithersimple
(default) orresponsiveGrid
./layoutDisabled
- if set to true, it is not allowed to change the layout in the edit dialog./backgroundImageEnabled
- defines whether to display a background image option../backgroundColorEnabled
- defines whether to display a background color option../backgroundColorSwatchesOnly
- defines whether or not to display swatches in the background color picker../allowedColorSwatches
- defines a list of background color swatches that are allowed to be selected by an author.
It is also possible to define the allowed components for the Container.
The following properties are written to JCR for this Container component and are expected to be available as Resource
properties:
./layout
- defines the layout type, eithersimple
(default) orresponsiveGrid
; if no value is defined, the component will fallback to the value defined by the component's policy
./backgroundImageReference
- defines the container background image../backgroundColor
- defines the container background color../id
- defines the component HTML ID attribute.
./accessibilityLabel
- defines an accessibility label for the container../roleAttribute
- defines a role attribute for the container.
BLOCK cmp-container
The following property is required in the proxy component to enable full editing functionality for the Container:
./cq:isContainer
- set to{Boolean}true
, marks the Container as a container component
- Vendor: Adobe
- Version: v1
- Compatibility: AEM 6.5
- Status: production-ready
- Documentation: https://www.adobe.com/go/aem_cmp_container_v1
- Component Library: https://www.adobe.com/go/aem_cmp_library_container
- Author: Ankur Ahlawat
- Co-authors: Vlad Bailescu, Shailesh Bassi
If you were involved in the authoring of this component and are not credited above, please reach out to us on GitHub.