Expand my Community achievements bar.

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

add custom attribute in clientlibs generated script tag.

Avatar

Level 1

OS: RHEL 7.6
Server: AEM-6.5.1 SP-6.5.20
Dispatcher: (build 4.3.2/apache2.4-linux-x86_64-ssl)

ACS Commons: v4.12.0

 

we are using versioned clientlibs which is working as expected. Now we need to add custom attribute in clientlibs generated script tag as below.

 

<script data-cookieconsent="necessary" src="/etc.clientlibs/myproject/clientlibs/clientlib-base.min.ACSHASH4486893c76fcb85f3930466a411c1975.js"></script>

 

Do we need to customize anything in AEM OOTB or ACS-Commons level add the custom attribute ? Thanks in advance for your replies.

Topics

Topics help categorize Community content and increase your ability to discover relevant content.

1 Accepted Solution

Avatar

Correct answer by
Community Advisor
2 Replies

Avatar

Correct answer by
Community Advisor

Avatar

Level 7

Hi @haq81 ,

You can check the following github project to achieve the custom attributes in your script tag

 

.customAttributes - set arbitrary HTML attributes, e.g. customAttributes=['attr1=value 1','data-attr2=5','attr3']

 

Install the extension and try out the same. Hope this will help .

 

Ref :- https://wcm.io/wcm/ui/clientlibs/usage.html

 

Thanks,

Somen