Sightly - Include another HTML and pass parameters
Hi ![]()
I'm wondering if this is possible?
I have a component (xcomponent) and have the two sightly templates in this as follows
- xcomponent.html
- y.html
I'm using JAVA-USE API to get the data for the template and including the y.html in xcomponent.html as below
<div data-sly-use.componentService="XComponentProxy" data-sly-test="${componentService}" data-sly-unwrap=""> <div data-sly-test.componentData="${componentService.componentData}" data-sly-unwrap=""> <!-- Template HTML goes here --> <!-- Template HTML goes here --> <!-- Template HTML goes here --> <div data-sly-include="y.html" data-sly-unwrap="${!(wcmmode.edit || wcmmode.design)}"></div> </div> </div>Can someone please help me on how to pass the parameters from xcomponent.html to y.html so that I can use componentData created in xcomponent in y.html?
Thanks,