Experience Fragment is not showing on the content tree even if the container has cq:isContainer true and has cq:editConfig and cq:childEditConfig | Community
Skip to main content
Level 3
January 8, 2025
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

  • January 8, 2025
  • 2 replies
  • 734 views

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!

Best answer by arunpatidar

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>  

 

2 replies

Level 3
January 8, 2025

Adding here is I used this as resourceSuperType

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

 

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
January 8, 2025

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
Level 3
January 8, 2025

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

 

arunpatidar
Community Advisor
Community Advisor
January 8, 2025

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.

 

Arun Patidar