Expand my Community achievements bar.

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

Issues with loadin inline clientlib

Avatar

Level 4

Hello Community - We see some issues with loading the clientlib which has the allowProxy property set to true. Can someone tell me if we require to do any additional changes to load the clientlib.

 

<style type="text/css"
data-sly-use.clientlibs="${'com.adobe.cq.wcm.core.components.models.ClientLibraries' @ categories='wknd.base'}">
${clientlibs.cssInline @ context="unsafe"}
</style>

8 Replies

Avatar

Community Advisor

@test1234567 

 

Can you please try?

 

<sly data-sly-use.clientLib="/libs/granite/sightly/templates/clientlib.html"
data-sly-call="${clientlib.css @ categories='wknd.base'}"/>

 

<sly data-sly-use.clientlib="/libs/granite/sightly/templates/clientlib.html">
<sly data-sly-call="${clientlib.js @ categories='wknd.base'}"/>
</sly>

 


Aanchal Sikka

Avatar

Level 4

Thanks for your reply. I want to include the inline clientlib which has the allowProxy set to true. Can you check this url ?

 

https://experienceleague.adobe.com/en/docs/experience-manager-core-components/using/developing/inclu...

Avatar

Community Advisor

@test1234567 

 

Please elaborate what the issue is, when using inline css


Aanchal Sikka

Avatar

Level 4

The inline css or style tag is not loading. I have even tried with inline js as well but no luck. Can you check if this is working for you or not?

 

<style type="text/css"
data-sly-use.clientlibs="${'com.adobe.cq.wcm.core.components.models.ClientLibraries' @ categories='wknd.base'}">
${clientlibs.cssInline @ context="unsafe"}
</style>

 

<script type="text/javascript"
data-sly-use.clientlibs="${'com.adobe.cq.wcm.core.components.models.ClientLibraries' @ categories='wknd.base'}">
${clientlibs.jsInline @ context="unsafe"}
</script>

Avatar

Community Advisor

@test1234567 

 

Its working for me. Do you have wknd.base on your system currently?


Aanchal Sikka

Avatar

Level 4

I didn't try with wknd.base category. I tried with project specific clientlib only. Can you check if the clientlib has the allowProxy property set to true? Also can you confirm if you had to declare anything?

Avatar

Community Advisor

@test1234567  allowProxy is set to true.

I didn't have to declare anything


Aanchal Sikka

Avatar

Level 4

Can you tell me what version of core components you're using? I have even tried with setting the allowProxy value to false but no luck. I'm using core component version 2.19.0.