Expand my Community achievements bar.

SOLVED

Experience Fragment is not showing on the content tree even if the container has cq:isContainer true and has cq:editConfig and cq:childEditConfig

Avatar

Level 4

Hi all, 
I've created a component that has property in .content.xml

cq:isContainer="{Boolean}true"

 I've also created cq:childEditConfig and cq:editConfig

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
cq:actions="[edit]"
jcr:primaryType="cq:EditConfig"/>

 

<?xml version="1.0" encoding="UTF-8"?>
<jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0"
jcr:primaryType="cq:EditConfig">
<cq:listeners
jcr:primaryType="cq:EditListenersConfig"
afterchildinsert="REFRESH_PAGE"
afteredit="REFRESH_PAGE"/>
</jcr:root>

 I've also added a parsys on the htl

<div data-panelcontainer="${wcmmode.edit}" data-placeholder-text="${wcmmode.edit && 'Please Items Here' @ i18n}" >
<sly data-sly-resource="${resource.path @ resourceType='wcm/foundation/components/parsys/newpar', appendPath='/*', decorationTagName='div', cssClassName='new section aem-Grid-newComponent'}"
data-sly-test="${(wcmmode.edit || wcmmode.preview)}"></sly>
</div>


But when I tried to add components, it doesn't reflect on the content tree, but visible on the crxde. I'm not really sure what I'm missing here, can you help point it out. Thanks!

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @LyonMartin 

You need to add parsys type i.e. wcm/foundation/components/parsys 

<div data-panelcontainer="${wcmmode.edit}" data-placeholder-text="${wcmmode.edit && 'Please Items Here' @ i18n}" >
<sly data-sly-resource="${resource.path @ resourceType='wcm/foundation/components/parsys', decorationTagName='div', cssClassName='new section aem-Grid-newComponent'}"
data-sly-test="${(wcmmode.edit || wcmmode.preview)}"></sly>
</div>  

 



Arun Patidar

View solution in original post

4 Replies

Avatar

Level 4

Adding here is I used this as resourceSuperType

sling:resourceSuperType="core/wcm/components/panelcontainer/v1/panelcontainer"

 

Avatar

Correct answer by
Community Advisor

Hi @LyonMartin 

You need to add parsys type i.e. wcm/foundation/components/parsys 

<div data-panelcontainer="${wcmmode.edit}" data-placeholder-text="${wcmmode.edit && 'Please Items Here' @ i18n}" >
<sly data-sly-resource="${resource.path @ resourceType='wcm/foundation/components/parsys', decorationTagName='div', cssClassName='new section aem-Grid-newComponent'}"
data-sly-test="${(wcmmode.edit || wcmmode.preview)}"></sly>
</div>  

 



Arun Patidar

Avatar

Level 4

That solves it. Though, I wonder what is the difference between the parsys and newpar?

 

Avatar

Community Advisor

Hi @LyonMartin 

I am not entirely sure but newpar is a helper subcomponent of parsys which helps rendering drag and drop area in author mode.

arunpatidar_0-1736326247497.png

 



Arun Patidar