Reputation: 41
I've been asked to create a CQ5 "overlay" component by simply copying the out-of-box component from /libs/foundation/components/flash to /apps/myproject/components/flash. My question is: what happens to the original - is it just ignored?
Upvotes: 3
Views: 4922
Reputation: 1077
a CQ5 "overlay" leverages sling rules for resource resolving. if /libs/foundation/components/flash
needs an overlay, you "overlay" the corresponding file at location /apps/foundation/components/flash/
filename This will CHANGE how the foundation component behaves in all instances. And the existing sidekick component remains, but behaves differently.
If you have a NEW component at /apps/myproject/components/flash
, it can inherit from the foundation component via sling:resourceSuperType
on the new component. In that case, you have a new component in the sidekick. In your new component, you could use the same values for jcr:title
, componentGroup
, or you could change them to distinguish your component in the sidekick. If the title, componentGroups are the same, the sidekick can distinguish them with parenthesis around the webapp (foundation) vs (myproject). However, I have seen situations where it is impossible as an author to distinguish them.
Upvotes: 6
Reputation: 21
Just to clarify: overlay and flash are two different things. Sample of overlay implementation: http://jquerytools.org/documentation/overlay/index.html
So if you were asked to create an Overlay component, copying a Flash one might not be the best idea.
Upvotes: 1
Reputation: 431
It is not ignored. Both components can show up in the authors' sidekick -- one will say flash (foundation), the other flash (myproject). When one of these is used by an author CQ will instantiate appropriately. The usual rules apply for what shows up in the sidekick (group name, selected in design mode, etc.)
Upvotes: 2