AEM – Reusing touch dialog fields/tabs using include

Base Component – actual cq:dialog

<bannerImage jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/form/pathbrowser"
fieldDescription="Select banner image" fieldLabel="Banner Image"
name="./bannerImage" />

Reusing bannerImage field in other component

<bannerImage
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/foundation/include"
path="/apps/reuse/components/content/banner/cq:dialog/content/items/tab1/items/columns/items/bannerImage"/>

path – actual dialog field path which need to be reused in the different component, above xml forms the node in the crx/de as shown below and the cq:dialog field

Published by Hunk

Adobe experience Manager (AEM) & Java developer

Join the Conversation

  1. Unknown's avatar
  2. Hunk's avatar

2 Comments

  1. I need to replace the fieldlabel inheriting from parent, I have tried to override the field but still displaying from parent field.

    Like

Leave a comment

Design a site like this with WordPress.com
Get started