We have to implement the functionality similar to Reference Component but using sightly but with little customization. Default Foundation Component is using sling:include but I have tried using <div data-sly-resource="${item.path @ appendPath='/jcr:content/par/'}" data-sly-unwrap/> and this is returning the data but it is returning the parsys as well. I don't want to include parsys. Is there anything which I can use to achieve this.
If you could check the default reference component,it will return only what is present in the parsys
Thanks in advance
Mahesh Karle
Solved! Go to Solution.
I just put this together and tested it out on Geometrixx Outdoors and it worked perfectly fine.
reference.html
<h3 data-sly-test="${wcmmode.edit || wcmmode.design}">Edit Using Dialog</h3> <sly data-sly-test="${properties.path}" data-sly-resource="${properties.path}"></sly>
dialog.xml
<?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:Dialog" height="400" stateful="false" xtype="dialog"> <items jcr:primaryType="cq:WidgetCollection"> <tabs jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> <reference jcr:primaryType="cq:Panel" title="Reference"> <items jcr:primaryType="cq:WidgetCollection"> <path jcr:primaryType="cq:Widget" fieldLabel="Reference" name="./path" xtype="paragraphreference" /> </items> </reference> </items> </tabs> </items> </jcr:root>
Component Definition
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" jcr:title="Reference - Sightly" sling:resourceSuperType="foundation/components/parbase" componentGroup="General" />
I just put this together and tested it out on Geometrixx Outdoors and it worked perfectly fine.
reference.html
<h3 data-sly-test="${wcmmode.edit || wcmmode.design}">Edit Using Dialog</h3> <sly data-sly-test="${properties.path}" data-sly-resource="${properties.path}"></sly>
dialog.xml
<?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:Dialog" height="400" stateful="false" xtype="dialog"> <items jcr:primaryType="cq:WidgetCollection"> <tabs jcr:primaryType="cq:TabPanel"> <items jcr:primaryType="cq:WidgetCollection"> <reference jcr:primaryType="cq:Panel" title="Reference"> <items jcr:primaryType="cq:WidgetCollection"> <path jcr:primaryType="cq:Widget" fieldLabel="Reference" name="./path" xtype="paragraphreference" /> </items> </reference> </items> </tabs> </items> </jcr:root>
Component Definition
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" jcr:primaryType="cq:Component" jcr:title="Reference - Sightly" sling:resourceSuperType="foundation/components/parbase" componentGroup="General" />
Nice example!
Views
Replies
Total Likes
Thanks for quick reply ..Actually I had to copy the same dialog as well. It works now Thanks again
Views
Replies
Total Likes