Expand my Community achievements bar.

SOLVED

How to include themed clientlibs in HTL/Sightly?

Avatar

Level 2

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.

1 Accepted Solution

Avatar

Correct answer by
Level 10

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

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

View solution in original post

3 Replies

Avatar

Level 10

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.

Avatar

Level 2

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.

Avatar

Correct answer by
Level 10

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

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