Hi All,
In link https://docs.adobe.com/docs/en/cq/5-6/howto/taglib.html , there are couple of tag libraries which look similar
<CQ:INCLUDE>
<SLING:INCLUDE>
<SLING:DEFINEOBJECTS>
<CQ:DEFINEOBJECTS>
Is there any difference between these or they serve the same purpose. If there is any snippet of code that explains the difference, it would be helpful.
Can you please provide some inputs on this.
Solved! Go to Solution.
They can be used to achieve the same result, however it would really depend on what you are trying to do. For example, the <sling:include> can do the same thing as the <cq:include>, but it has more parameters that you can use if you need them. You can read more about the attributes in the Sling documentation here: http://sling.apache.org/documentation/bundles/sling-scripting-jsp-taglib.html#include.
I would recommend reading these two articles if you would like more information on <sling:include> and <cq:include>:
http://dev.day.com/content/ddc/blog/2010/09/crx_gems_using_slin.html
https://helpx.adobe.com/experience-manager/kb/CQIncludes.html
They can be used to achieve the same result, however it would really depend on what you are trying to do. For example, the <sling:include> can do the same thing as the <cq:include>, but it has more parameters that you can use if you need them. You can read more about the attributes in the Sling documentation here: http://sling.apache.org/documentation/bundles/sling-scripting-jsp-taglib.html#include.
I would recommend reading these two articles if you would like more information on <sling:include> and <cq:include>:
http://dev.day.com/content/ddc/blog/2010/09/crx_gems_using_slin.html
https://helpx.adobe.com/experience-manager/kb/CQIncludes.html
The CQ-tags add more CQ/AEM specific functionalities on top of the Sling-tags.
I would always use the CQ-tags.
Views
Replies
Total Likes
Hi Feike/swesto01,
Thanks a lot for providing inputs on this.
Views
Replies
Total Likes
Views
Like
Replies