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!
Solved! Go to Solution.
Views
Replies
Total Likes
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>
Adding here is I used this as resourceSuperType
sling:resourceSuperType="core/wcm/components/panelcontainer/v1/panelcontainer"
Views
Replies
Total Likes
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>
That solves it. Though, I wonder what is the difference between the parsys and newpar?
Views
Replies
Total Likes
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.
Views
Likes
Replies