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?
Solved! Go to Solution.
Views
Replies
Total Likes
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.
[1]: https://andreishilov.github.io/blog/proxing-clientlib/
Hope that helps!
Regards,
Santosh
Hi,
Adding allowProxy property to clientlibs folder under apps will auto change the path from /apps to /etc.clientlibs while rendering the page.
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.
[1]: https://andreishilov.github.io/blog/proxing-clientlib/
Hope that helps!
Regards,
Santosh
Views
Likes
Replies