Hi All,
We are using sightly to develop components and we want to include client libraries.
How to do this using sightly?
Thanks,
Kishore
Solved! Go to Solution.
See this AEM documentation topic:
http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html#Loading Client Libraries
Hope this helps...
Views
Replies
Total Likes
See this AEM documentation topic:
http://docs.adobe.com/content/docs/en/aem/6-0/develop/sightly.html#Loading Client Libraries
Hope this helps...
Views
Replies
Total Likes
I have configured clientlib as below but client libraries are not effecting on the page.
<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">
<clientlib data-sly-call="${clientLib.all @ categories='apps.elibrary.common'}" data-sly-unwrap/>
<div data-sly-resource="${'logo' @ resourceType='elibrary/components/page/logo'}"></div>
</head>
What's the issue?Please help me.
Thanks,
Kishore
Views
Replies
Total Likes
When you look at the page in the browser - is there an error message or missing CSS styles?
Views
Replies
Total Likes
issue got resoled.
I have added css file names with , separated in css.txt file.I have removed them and now css are applying.
Views
Replies
Total Likes
i don't see any error on the page.
is there any example which added client libs using Sightly?
Views
Replies
Total Likes
Best Answer: https://gist.github.com/yupadhyay/a7348e7fbf98590f176c
<head data-sly-use.clientLib="${'/libs/granite/sightly/templates/clientlib.html'}">
<!--for css+js --><meta data-sly-call="${clientLib.all @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!-- only js --><meta data-sly-call="${clientLib.js @ categories='your.clientlib'}" data-sly-unwrap></meta>
<!-- only css --><meta data-sly-call="${clientLib.css @ categories='your.clientlib'}" data-sly-unwrap></meta>
</head>
In AEM 6.5 we can also include clientLibs like this.
<sly data-sly-use.clientlibs="${'com.adobe.cq.wcm.core.components.models.ClientLibraries'
@ categories='components.custom.embed.v1'}"> ${clientlibs.jsAndCssIncludes @ context="unsafe"} </sly>
Views
Likes
Replies
Views
Likes
Replies