Hello all,
Is it possible to include client libraries for Static template ?? And can we only give Page(core component) as a resource type for static template ?
Solved! Go to Solution.
Views
Replies
Total Likes
If you want, you can create more js and css folder(client library) but make sure the category would be same as you used inside headlibs or footlibs , otherwise you need to add one more line in your libs file.
Example
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.css @ categories='mysite.core.cat1'}" />
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.css @ categories='mysite.core.cat2'}" />
Hi,
It is possible and have been done in the past as well.
You have to it in headlibs.html or footerlibs.html
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.css @ categories='mysite.core'}" />
@arunpatidar Thank you. I have also checked my project structure. There also I can see the like the above clientlib code. So is it enough or do I need to create separate clientlib folder with css & js ??
If you want, you can create more js and css folder(client library) but make sure the category would be same as you used inside headlibs or footlibs , otherwise you need to add one more line in your libs file.
Example
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.css @ categories='mysite.core.cat1'}" />
<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientlib.css @ categories='mysite.core.cat2'}" />