내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

Working with building blocks - nested container

Avatar

Level 2

Hi

 

Context:

We're recently implemented building blocks functionality in our project. We have a custom layout container component which we use as base to drag/drop components. But this custom component was not supporting the drag/drop of building block in it.

Yes, we've made sure to set policy for the layout container to include building block, but still it didn't work out. So we used WKND package, and created an overlay of 'core/wcm/components/container/v1/container' and create a new XF template around it. And we were able to achieve it.

 

Problem:

We are trying to using this overlayed container component, in a custom wrapper component (using data-sly-resource). This is causing two issues:

  1. We're not able to drag/drop building blocks like we used to (if the container is nested, instead of base for the XF)
  2. We've tried setting policy manually for nested container to include our components, as well as building block component. We're not able to drag/drop any components inside nested container.

Attaching code-snippet of data-sly-resource. 

<div class="<my-class> aem-GridColumn">
                <sly data-sly-resource="${'container' @ resourceType='<my-project>/components/content/containers/container'}">
                </sly>
            </div>

Any help is appreciated. Thanks, in advance.

 

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Community Advisor

hello @cmanoha1 

 

I am able to add components to the container.

 

Here are the steps I tried. Please let me know, what am I missing:

1. add container to seperator component

aanchalsikka_0-1694073333042.png

2. I go to the Seperator and click on container to add components

aanchalsikka_1-1694073568187.png

 

Please note that with following all components are added under container node of separator.

<sly data-sly-resource="${'container' @ resourceType='wknd/components/container'}">

 

aanchalsikka_2-1694073657260.png

 

 

And the policy that it is picking is /conf/wknd/settings/wcm/templates/landing-page-template/policies/jcr:content/root/container

So, any components that are allowed via policy on this level, are also available for the component

 


Aanchal Sikka

원본 게시물의 솔루션 보기

2 답변 개

Avatar

정확한 답변 작성자:
Community Advisor

hello @cmanoha1 

 

I am able to add components to the container.

 

Here are the steps I tried. Please let me know, what am I missing:

1. add container to seperator component

aanchalsikka_0-1694073333042.png

2. I go to the Seperator and click on container to add components

aanchalsikka_1-1694073568187.png

 

Please note that with following all components are added under container node of separator.

<sly data-sly-resource="${'container' @ resourceType='wknd/components/container'}">

 

aanchalsikka_2-1694073657260.png

 

 

And the policy that it is picking is /conf/wknd/settings/wcm/templates/landing-page-template/policies/jcr:content/root/container

So, any components that are allowed via policy on this level, are also available for the component

 


Aanchal Sikka

Avatar

Level 2

Hi @aanchal-sikka 

Thanks for the suggestion. It did help me diagnose the issue. In my case it was due to an internal JS script.

 

Thanks!