Expand my Community achievements bar.

Get ready! An upgraded Experience League Community experience is coming in January.

Mark Solution

This conversation has been locked due to inactivity. Please create a new post.

SOLVED

How to customize components without overlaying same components in libs layer?

Avatar

Level 9

Hi All,

We are need to customize DAM admin menu where we need to add new menu items to "New" menu.For this we need to move files under /libs/cq/ui layer /apps/cq/ui layer.

but we do not want to use this approach beacause it's overriding  already done customization in this layer.

Is there any way to do this without over laying and maintaining our own customization per application(/apps/<myproject>)?

Thanks,

Kishore

1 Accepted Solution

Avatar

Correct answer by
Employee Advisor

Hi,

what AEM version are you using? With AEM 6.x you can use the sling resource merge approach [1], where don't have to add nodes into /libs anymore.

kind regards,
Jörg

[1] https://docs.adobe.com/docs/de/aem/6-0/develop/platform/overlays.html

View solution in original post

4 Replies

Avatar

Level 10

To overlay components - the best practice (aka- recommended way)is to move content from /libs to /apps. 

Customizing Components and Other Elements

When creating your own components or customizing an existing component it is often easiest (and safest) to re-use existing definitions. The same principles also applies to other elements within CQ, for example the error handler.
This can be done by copying and overlaying the existing definition. In other words, copying the definition from /libs to /apps/<your-project>. This new definition, in /apps, can be updated according to your requirements.

 

https://docs.adobe.com/docs/en/cq/5-6-1/developing/developing_guidelines_bestpractices.html

Do not modify code under libs - very bad practice. 

Avatar

Correct answer by
Employee Advisor

Hi,

what AEM version are you using? With AEM 6.x you can use the sling resource merge approach [1], where don't have to add nodes into /libs anymore.

kind regards,
Jörg

[1] https://docs.adobe.com/docs/de/aem/6-0/develop/platform/overlays.html

Avatar

Level 9

Thanks Mac for suggestion.

What you said is acceptable and good practice.

But the issue here is we need not to do overlaying and achieve this functionality?

Is there any such option available to do this??

Thanks,

Kishore

Avatar

Level 10

You either overlay existing component, create a new component, or modify content under libs (which is very bad practice).