내 커뮤니티 업적 표시줄을 확대합니다.

Submissions are now open for the 2026 Adobe Experience Maker Awards.

Mark Solution

활동이 없어 이 대화는 잠겼습니다. 새 게시물을 작성해 주세요.

해결됨

overlay clientlibs?

Avatar

Level 4

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,

何塞。

1 채택된 해결책 개

Avatar

정확한 답변 작성자:
Level 8

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.

원본 게시물의 솔루션 보기

3 답변 개

Avatar

Administrator

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



Kautuk Sahni

Avatar

정확한 답변 작성자:
Level 8

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.

Avatar

Level 4

awesome, good to know, thanks! smiley