Hi guys,
Does anyone know if it's possible to overlay client libraries?
I have the following structure:
/apps/example/clientlibs[categories="hola"]
/libs/example/clientlibs[categories="hola"]
When I look at the page on the browser both apps and libs clientlibs are included and thus code from both gets executed on client side events.
Any ideas?
Thanks a bunch,
何塞。
Solved! Go to Solution.
HI,
we cannot overlay clientlibs in aem, if you are using same category on more then one folder and using this category name in your jsp:-
/apps/example/clientlibs[categories="hola"]
/libs/example/clientlibs[categories="hola"]
Then it means that all clientlibs which has this category(for ex:-hola) will be loaded.
Hi
Please have a look at overlays documentation,
Link:- https://docs.adobe.com/docs/en/aem/6-2/develop/platform/overlays.html (Configuring the Search Paths)
//The resource Resolver Search Path as defined in the OSGi configuration for the Apache Sling Resource Resolver Factory.
The top-down order of search paths indicates their respective priorities.
In a standard installation the primary defaults are /apps, /libs - so the content of /apps has a higher priority than that of /libs (i.e. it overlays it).
The list of absolute path prefixes applied to find resources whose path is just specified with a relative path. The default value is [ "/apps", "/libs" ]. If an empty path is specified a single entry path of [ "/" ] is assumed. (resource.resolver.searchpath)
For Client libs,
You can try..
1) Create your own client library "mylib" in /etc/designs or /etc/clientlib
2) Embed all required client libs
3) Add the <cq:includeClientLib categories="mylib" /> at the beginning of
the page rendering process.
4) Check the generated HTML for inclusion of clientlibs. If there are more
clientlibs loaded as this "mylib", modify your embed definition and go to step 2.
~kautuk
Views
Replies
Total Likes
HI,
we cannot overlay clientlibs in aem, if you are using same category on more then one folder and using this category name in your jsp:-
/apps/example/clientlibs[categories="hola"]
/libs/example/clientlibs[categories="hola"]
Then it means that all clientlibs which has this category(for ex:-hola) will be loaded.
awesome, good to know, thanks!
Views
Replies
Total Likes