AEM 6.5 - Customize image component having DM media capability

Avatar

Avatar

aem_dev2

Avatar

aem_dev2

aem_dev2

10-03-2021

AEM Guru,

 

We want to customize the Image V2 core component which is having DM functionality. like adding few CTA functionality  along with the existing core functionality like DM and Lazy loading.

 

When i tried to add the cq:dialog my screen is looking like this :

 

Screen Shot 2021-03-10 at 6.57.14 PM.png

null tab is from image component and other ones are from my customization.

 

Any help will be appreciated. 

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar

Vijayalakshmi_S

MVP

Avatar

Vijayalakshmi_S

MVP

Vijayalakshmi_S
MVP

10-03-2021

Hi @aem_dev2,

For override/extend the dialog when your component is inheriting from core Image V2

  • Copy the cq:dialog node from core v2 image to your image component
  • If you want the Asset and Metadata tabs and its content to be available along with new tabs,
    • Delete the asset and metadata node under /cq:dialog/content/items/tabs/items
    • add new tab items under this path.
  • If you don't want the Asset and Metadata tabs and its content to be part of your dialog,
    • let the node name be asset and metadata, you can choose to change the title of tab item (asset node for example) and its contents. 
    • node named asset and metadata should be available which indicates we are overriding the respective nodes, otherwise the same will be available in your dialog as we are inheriting the component from core v2 Image.

Screenshot for clarity:

Vijayalakshmi_S_0-1615390551637.png

Only asset node is overridden, metadata tab is coming from Core Image V2 dialog

Vijayalakshmi_S_1-1615390611255.png

 

Answers (1)

Answers (1)

Avatar

Avatar

Anudeep_Garnepudi

MVP

Avatar

Anudeep_Garnepudi

MVP

Anudeep_Garnepudi
MVP

10-03-2021

@aem_dev2 

Make sure your tabs are under cq:dialog/content/items/tabs/items path. If you don't want the parent component tabs use sling resource merger property sling:hideChildren   String[]    asset,metadata to items node under tabs.