Hello Devs,
I have one requirement where javascript code should load every time for every page.
I went through the clientlibs approach but below challenges I am having with current project -
1. They have multiple page components to Author different type of pages
2. There is no common clientlib i have observed till now which loads for every page
Please can anyone guide me what should be the correct approach to deal with such cases.
Thanks
Solved! Go to Solution.
Views
Replies
Total Likes
If you utilise the WCM Core Components V2 Page, as your websites base page during the creation of the editable templates, you can utilize the editable template's Page Policies to set specific client libraries for different templates.
Please refer to screenshots on https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/load-site-specific-client-...
Hi @sr1045 ,
You may target template and add js at template level.
Most probably one page component overridden from core component would be getting used in all the template types( or even you may be having limited number of template)
You can create a clientlib category and can add in customfooterlibs.html of that page component which are getting used in all the template
PFA
If it just few line of script tag like for gtm etc you can directly tadd that cript in head.html
So based on your use case you can add js centrally which will reflect in all the already created and future pages
Thanks,
Thanks @MukeshYadav_
If you utilise the WCM Core Components V2 Page, as your websites base page during the creation of the editable templates, you can utilize the editable template's Page Policies to set specific client libraries for different templates.
Please refer to screenshots on https://experienceleaguecommunities.adobe.com/t5/adobe-experience-manager/load-site-specific-client-...
Thanks @aanchal-sikka
Views
Likes
Replies
Views
Likes
Replies