Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

SOLVED

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

Avatar

Level 1

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?

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

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.htm...

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

Hope that helps!
Regards,

Santosh

View solution in original post

2 Replies

Avatar

Community Advisor

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.htm...

Avatar

Correct answer by
Community Advisor

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.htm...

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

Hope that helps!
Regards,

Santosh