Expand my Community achievements bar.

Dive into Adobe Summit 2024! Explore curated list of AEM sessions & labs, register, connect with experts, ask questions, engage, and share insights. Don't miss the excitement.
SOLVED

Creating a container component

Avatar

Level 1

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,

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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

View solution in original post

6 Replies

Avatar

Employee

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">

Avatar

Correct answer by
Community Advisor

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

Avatar

Level 1

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

Avatar

Level 10

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.

Avatar

Level 2

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

Including a layout Container in a React component

Avatar

Level 2

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.

eagwg1xtofeculc6m9tkswrb.png

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.

zwo31vfueu4wzmtj0s2samxa.png

Hopefully, it can help you and folks.