Creating a container component | Community
Skip to main content
pdxrocks
December 6, 2017
Solved

Creating a container component

  • December 6, 2017
  • 5 replies
  • 6330 views

I need to create a container component that can accept other components. Can anyone point me to some documentation about this? My searches haven't been lucky so far.

I tried setting cq:isContainer flag but that didn't do anything. Obviously there's more to it than just that.

Using 6.3 and editable templates.

Thanks,

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by VeenaVikraman

I am not sure about you requirement though. But sometimes in such cases , I actually create a container which have a parsys and I can drop any number of components into it. A simple example would be something like this Creating a custom Touch UI Grid Component for Adobe Experience Manager

5 replies

Adobe Employee
December 6, 2017

If this component is fixed in the editable template, then policy can be set to allow specific components which can be used within this container component.

Responsive grid can be used as container component or it can hold you customized container component.

<responsivegrid

     jcr:primaryType="nt:unstructured"

     sling:resourceType="wcm/foundation/components/responsivegrid"

     editable="{Boolean}true">

VeenaVikraman
Community Advisor
VeenaVikramanCommunity AdvisorAccepted solution
Community Advisor
December 6, 2017

I am not sure about you requirement though. But sometimes in such cases , I actually create a container which have a parsys and I can drop any number of components into it. A simple example would be something like this Creating a custom Touch UI Grid Component for Adobe Experience Manager

January 11, 2022

Hi Veena, I am looking for solution for similar issue. The link you provided was not accessible as of now. can you help provide another example

smacdonald2008
Level 10
December 7, 2017

Veena example is a perfect example of how you can create a container component. You can create this component and then set other components in it. This would be useful for most web sites.

Level 2
November 12, 2018

I have posted a similar question for React side. Has anyone implemented it yet? Examples Appreciated.  

Including a layout Container in a React component

VuongNguyen
Level 2
January 15, 2024

I thought you could use Overlay and override AEM core component to create a customized container or imitate the process of making a new custom container component.

Then, you you can copy the container folder and paste it directly into /apps/core/wcm/components/. Later on, you can modify certain parts of the Container component to fit the needs of your regular project.

Hopefully, it can help you and folks.