Hi All,
I want to preload the components in a template before displaying the page. I can add the components to template from the sidekick but I don't want to do it that way. I am newbee to Adobe AEM/CQ5. Please help me out with an example.[img]preload-template.png[/img]
There is an answer in this URL but it is not working as expected. http://stackoverflow.com/questions/22392147/cq5-preload-a-parsys-with-components#answers-header
Please let me know if any more information is needed.
Thanks in Advance
Solved! Go to Solution.
Hi,
In your page component for a particular template add the below snippet to include the component directly
<cq:include path="<component name>" resourceType="<component path>"/>
ex: <cq:include path="header" resourceType="abc/components/header"/>
This will load the header directly in the template. Similarly you can include any component
Hi,
In your page component for a particular template add the below snippet to include the component directly
<cq:include path="<component name>" resourceType="<component path>"/>
ex: <cq:include path="header" resourceType="abc/components/header"/>
This will load the header directly in the template. Similarly you can include any component
Thanks for the reply. This way it won't get displayed on the page directly. Correct me if I am wrong. This will add the component to sidekick from there we can add to page. But I want to display the component on the page directly.
Regards
M. Ramana Reddy
Views
Replies
Total Likes
Thank you very much. That did work. But I did it in sightly.
<div data-sly-resource="${@path='<component_name>', resourceType='<path/to/component'}"/>
Views
Replies
Total Likes