We have implemented Rocketloader functionality on our website and we want the Rocket Loader to ignore one of the clientlibs.
https://developers.cloudflare.com/fundamentals/speed/rocket-loader/ignore-javascripts/
As mentioned in above URL, we are supposed to add data-cfasync=”false” for Rocket Loader to ignore the js, but we are not able to do so with sightly.
This is our inclusion tag
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html"></sly>
<sly data-sly-test="${X}" data-sly-call="${clientlib.js @ categories=X}"></sly>
We tried something like this,
<sly data-sly-test="${X}" data-sly-call="${clientlib.js @ categories=X,data-cfasync=”false”}"></sly>
It did not work and gave the following exception.
Any help is appreciated. Thanks in advance.
@Tushaar_Srivastava1 @arunpatidar @kautuk_sahni
Solved! Go to Solution.
Views
Replies
Total Likes
Hi,
We have to write custom logic to include additional tags to AEM clientlibs. You can refer below link for the same
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/ClientLibsModel.java
Hi,
We have to write custom logic to include additional tags to AEM clientlibs. You can refer below link for the same
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/ClientLibsModel.java
Thanks for your response !
you have a sytax error
<sly data-sly-test="${X}" data-sly-call="${clientlib.js @ categories=X,data-cfasync=”false”}"></sly>
Should be
<sly data-sly-test="${X}" data-sly-call="${clientlib.js @ categories=X,data-cfasync='false'}"></sly>
If this does not work, try with custom clientlibs model
https://github.com/arunpatidar02/aem63app-repo/blob/master/java/ClientLibsModel.java
Hi @arunpatidar ,
<sly data-sly-test="${X}" data-sly-call="${clientlib.js @ categories=X,data-cfasync='false'}"></sly> is not working.
Seems like I need to try with custom clientlibs model.
Thanks for your timely response.
Views
Likes
Replies
Views
Likes
Replies