Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

How to include themed clientlibs in HTL/Sightly?

ekta_aggarwal
Level 2
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
edubey
Correct answer by
Level 10
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
smacdonald2008
Level 10
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.

ekta_aggarwal
Level 2
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.

edubey
Correct answer by
Level 10
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