How to include themed clientlibs in HTL/Sightly? | Community
Skip to main content
Level 2
Mar 23, 2018 1:05 PM UTC
Solved

How to include themed clientlibs in HTL/Sightly?

Hi,

I know that in jsp, we can use themed clientlibs by using themed attribute:

<cq:includeClientLib js="themeParent" themed="false"/>

But not able to find how to use it in Sightly.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
edubey
edubeyAccepted solution
Level 10
Mar 26, 2018 6:57 AM UTC

There is no way. except calling this include statement conditionally.

That's the implementation for reference /libs/granite/sightly/templates/ClientLibUseObject.java

3 replies

edubey
edubeyAccepted solution
Level 10
Mar 26, 2018 6:57 AM UTC

There is no way. except calling this include statement conditionally.

That's the implementation for reference /libs/granite/sightly/templates/ClientLibUseObject.java

Translate
ekaggarwAuthor
Level 2
Mar 26, 2018 4:35 AM UTC

I was not asking how to include all clientlibs in HTL, my question is how to use themed clientlibs in HTL as we use in jsp explained above.

Translate
smacdonald2008
Level 10
Mar 23, 2018 2:12 PM UTC

To include ClientLibs by using HTL - you use this syntax:

<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html" data-sly-call="${clientLib.js @ categories='Lab2018.all'}"

THen all the CSS included in that clientlibs is applied.

Translate