How to use / understand the concepts of merging, overriding, and add-ins AEM Sling

I am trying to understand the concept of AEM Sling resource merging. According to the examples of Adobe documents Overriding (setting page properties) , Overlay (setting up consoles (touch optimized user interface)) I am confused how to use it, can anyone explain using a simple component to better understand it.

+3
source share
1 answer

You will find an explanation here.

Overlay: When you overlay a component in AEM, it means copying the component from folder /libs/to folder /apps/... And you can overlay your own definitions (e.g. change name, group, business logic functionality) on newly copied components in/apps/..

According to OSGI’s preferences, by default, AEM uses the search path to search for a resource, first searches for a branch /apps/and then a branch /libs, so your newly copied components in /apps/take precedence over /libs/.

Note that we can change the search path and its priority order by changing it from the Felix console of the Apache Sling Factory Resource Solver .

libs/foundation/components/ , , , .. , jsp . , , sidekick, /apps/.., , componentGroups /libs/.., (foundation) vs (your project). Overlay

Override: / sling:resourceSuperType.

sling:superResourceType /libs/, .

sling:superResourceType , ( projectA ProjectB .., lib). AEM 6.0 Granite Touch, Adobe AEM6.0 Overlay

Sling: Sling Resource Merger . Sling (org.apache.sling.resourcemerger), , . (.. Overlay Override).

Sling

  • / ,
  • /
  • /

  • sling: hideProperties (String String []) - . * .

  • sling: hideResource (Boolean). , , .

  • sling: hideChildren (String String []). node , . node . * .

  • sling: orderBefore (String). sibling node, node.

AEM , Felix org.apache.sling.resourcemerger

Sling Resource Merger AEM :

  • , /libs.
  • , /libs.

AEM,

node jcr:title, , /libs/ /apps

Tool name before overlay

Overlay tools

Confirm overlay

jcr:title overlay node, /apps/.. Update title Tool Name Updated

libs

sling Resource Merger

, , node jcr:title, sling:hideProperties, . overlay sites

.

name of hidden sites

. , .

+10

Source: https://habr.com/ru/post/1679967/


All Articles