When to use data-sly-include vs data-sly-call/data-sly-template
Solved! Go to Solution.
Views
Replies
Total Likes
Sometimes I explain data-sly-template as a HTML-function ( you can call it multiple times, pass in parameters etc).
data-sly-include is to include other html/jsp resources.
Views
Replies
Total Likes
Here is basic stuff reg their usage:
data-sly-template: Template is the way by which you render one content with different behavior by passing different params. So create a template which renders html and value can be passed dynamically. Logically it can be co-related to the way you use any function by passing different params. Check this out http://adobeaemclub.com/guide-for-working-with-templates-and-call-in-sightly-aem-6-1/
data-sly-include: It will include or replace with the content of file you are including here. It can be html, jsp, js, etc. Same content will be rendered apart from the logic you have put inside that html, jsp
Views
Replies
Total Likes
Sometimes I explain data-sly-template as a HTML-function ( you can call it multiple times, pass in parameters etc).
data-sly-include is to include other html/jsp resources.
Views
Replies
Total Likes
Views
Likes
Replies
Views
Likes
Replies