how to change automatically apps path to etc.clientlibs after page properties submission in aem 6.5.13 | Community
Skip to main content
New Participant
October 26, 2022
Solved

how to change automatically apps path to etc.clientlibs after page properties submission in aem 6.5.13

  • October 26, 2022
  • 2 replies
  • 1200 views

Hi Team,

we are migrating from 6.3 to 6.5.13. We changed path of clientlibs from etc to apps. In some Js files we are fetching design path(which is now under apps) from page properties . Since it is under apps images are not showing up on the pages(path of the image is becoming like this in js /apps/projectname/clientlibraries/resources/icon.png (i.e designpath obtained from js+relative image path already in js code )).

Previously it was under etc so it worked fine. If path is referring apps/projectname/clientlibraries/resources/icon.png it is not working. If I change manually to /etc.clientlibs/projectname/clientlibraries/resources/icon.png then it is working.

In page properties for content authors we are giving an option to select design path which will be showing apps/projectname path.

Is there is a way to change automatically from apps to etc.clientlibs after submitting page properties?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by SantoshSai

Hi @skakurathi21 ,

That's the expected behaviour, you don't need to change it from /apps to /etc.clientlibs.

In order to better isolate code from content and configuration, it is recommended to locate client libraries under /apps and expose them via /etc.clientlibs by leveraging the allowProxy property. 
allowProxy: If a client library is located under /apps, this property allows access to it via proxy servlet.

Please refer [0] & [1] for more details.

[0]: https://experienceleague.adobe.com/docs/experience-manager-64/developing/introduction/clientlibs.html?lang=en#locating-a-client-library-folder-and-using-the-proxy-client-libraries-servlet

[1]: https://andreishilov.github.io/blog/proxing-clientlib/

Hope that helps!
Regards,

Santosh

2 replies

SantoshSai
SantoshSaiAccepted solution
New Participant
October 26, 2022

Hi @skakurathi21 ,

That's the expected behaviour, you don't need to change it from /apps to /etc.clientlibs.

In order to better isolate code from content and configuration, it is recommended to locate client libraries under /apps and expose them via /etc.clientlibs by leveraging the allowProxy property. 
allowProxy: If a client library is located under /apps, this property allows access to it via proxy servlet.

Please refer [0] & [1] for more details.

[0]: https://experienceleague.adobe.com/docs/experience-manager-64/developing/introduction/clientlibs.html?lang=en#locating-a-client-library-folder-and-using-the-proxy-client-libraries-servlet

[1]: https://andreishilov.github.io/blog/proxing-clientlib/

Hope that helps!
Regards,

Santosh

Santosh Sai
Ravi_Pampana
New Participant
October 26, 2022

Hi,

 

Adding allowProxy property to clientlibs folder under apps will auto change the path from /apps to /etc.clientlibs while rendering the page.

 

Refer: https://experienceleague.adobe.com/docs/experience-manager-64/developing/introduction/clientlibs.html?lang=en