How to include themed clientlibs in HTL/Sightly? | Community
Skip to main content
Level 2
March 23, 2018
Solved

How to include themed clientlibs in HTL/Sightly?

  • March 23, 2018
  • 3 replies
  • 3805 views

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.
Best answer by edubey

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

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

3 replies

smacdonald2008
Level 10
March 23, 2018

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.

ekaggarwAuthor
Level 2
March 26, 2018

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
edubeyAccepted solution
Level 10
March 26, 2018

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

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