4

What is the difference between Extending a component, overriding a component and overlaying a component. Can someone please explain with developer point of view

Anil Jagtap
  • 1,740
  • 4
  • 27
  • 44
  • @i.net, Thank you for your response. But I didn't get clarity between how to override and overlay OOTB component . – Anil Jagtap Jun 23 '17 at 11:53
  • Can you be more specific with your understanding of the concept? The override/overlay concepts are well discussed in other post I mentioned. – Imran Saeed Jun 23 '17 at 11:56
  • @i.net, can you tell me how to override OOTB component in my project. I'm learning aem. Please help me. – Anil Jagtap Jun 23 '17 at 12:01
  • Just change the `sling:resourceSuperType` property of your component to override the behaviour of base component. – Imran Saeed Jun 23 '17 at 13:07
  • I have added more details in answer below to be more specific. – Imran Saeed Jun 23 '17 at 13:14
  • Possible duplicate of [How to use/understand AEM Sling Resource Merger, override and Overlay concepts](https://stackoverflow.com/questions/41688713/how-to-use-understand-aem-sling-resource-merger-override-and-overlay-concepts) – toniedzwiedz Jun 24 '17 at 07:42
  • @AnilJagtap may be help full https://aemvardhan.wordpress.com/2017/02/22/understand-aem-sling-resource-merger-override-and-overlay-concepts/ – VAr Jul 03 '17 at 22:26

1 Answers1

7

Extend and Overlay are same. It's just a matter of terminology. Extending and overlaying involves copying the component from /libs/ (or other base library) to /apps node and changing the behaviour.

Override is similar to extend but the only difference is that you change the sling:resourceSuperType of the component so that it's behaviour completely changes (hence overridden).

More details can be found at:

https://docs.adobe.com/docs/en/aem/6-3/develop/components/components-basics.html

Imran Saeed
  • 3,414
  • 1
  • 16
  • 27