Expand my Community achievements bar.

Guidelines for the Responsible Use of Generative AI in the Experience Cloud Community.
SOLVED

How to get the client lib categories by design in sighly

Avatar

Level 2

I have included the necessary css and js for my project via the following meta calls in my head.html and footer.html

<meta data-sly-call="${clientLib.css @ categories='com.myproject.all'}" data-sly-unwrap></meta>

 

 

<meta data-sly-call="${clientLib.js @ categories='com.myproject.all'}" data-sly-unwrap></meta>

However, I would want to get the category using the current design. Is that possible?

 or is there another way to dynamically include these based on design in my project.

Thanks,

Ravi

1 Accepted Solution

Avatar

Correct answer by
Employee

When you look in this file from the Sightly page-component:

/libs/wcm/foundation/components/page/head.html

You see this line:

 <meta data-sly-call="${headlibRenderer.headlibs @ designPath=head.designPath}" data-sly-unwrap></meta>

I think this is what you are looking for.

Make sure to declare headlibRenderer and head.

View solution in original post

1 Reply

Avatar

Correct answer by
Employee

When you look in this file from the Sightly page-component:

/libs/wcm/foundation/components/page/head.html

You see this line:

 <meta data-sly-call="${headlibRenderer.headlibs @ designPath=head.designPath}" data-sly-unwrap></meta>

I think this is what you are looking for.

Make sure to declare headlibRenderer and head.