Expand my Community achievements bar.

SOLVED

Exclude project level clientlibs

Avatar

Level 6

Hi everyone,

I am a specific requirement where I need to overlay OOTB page component and remove the project level clientlibs (clientlib-site, clientlib-base) from it. Can someone suggest the way to disable it on the overlayed page component.

 

Thanks

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

I think the problem is in your page policy.
Go to the Edit Template > Page Policy

Sady_Rifat_1-1681374570476.png

 

Sady_Rifat_0-1681374540445.png

Remove the clientlib you want to remove.

 

View solution in original post

3 Replies

Avatar

Community Advisor

Hello @Madhur-Madan ,
You can create a new page component where in customheaderlibs.html and customfooterlibs.html just remove those clientlibs and using that page component create a new template.
Page component resourceSuperType will be:

sling:resourceSuperType="core/wcm/components/page/v3/page"

 

Avatar

Level 6

@Sady_Rifat  I have already done that. Even though the styles are not getting added to the page but if I see the "view page source" I can still see the scripts added to the page.

Avatar

Correct answer by
Community Advisor

I think the problem is in your page policy.
Go to the Edit Template > Page Policy

Sady_Rifat_1-1681374570476.png

 

Sady_Rifat_0-1681374540445.png

Remove the clientlib you want to remove.