Expand my Community achievements bar.

Overlaying page dialog in AEM

Avatar

Level 3

Hi,

I would like to add some new fields to the page dialog's basic tab.
To do that I have defined the overlay for the page dialog xml at /apps/core/wcm/components/page/v3/page/_cq_dialog/content.xml .
This contains 

<content
granite:class="cq-dialog-content-page"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
<tabs
granite:class="cq-siteadmin-admin-properties-tabs"
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/tabs"
size="L">
<items jcr:primaryType="nt:unstructured">
<basic
jcr:primaryType="nt:unstructured"
jcr:title="Basic"
sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns">
<items jcr:primaryType="nt:unstructured">
<column
jcr:primaryType="nt:unstructured"
sling:resourceType="granite/ui/components/coral/foundation/container">
<items jcr:primaryType="nt:unstructured">
< HERE ARE MY FIELDS DEFINED >

These fields are displayed now on the page dialog, but my issue is that the basic tab fields from /libs/core/wcm/components/page/v3/page/_cq_dialog/content.xml
are missing.

I would expect that the items from /libs/ folder are displayed as well.
What do I miss?

Thanks,
Peter

 

 

 

 

5 Replies

Avatar

Community Advisor

@pnagy 

To create an overlay or override you need to recreate the original node, with the equivalent structure, under the destination (usually /apps). You can use sling resource merger to 

 

Check this Adobe user guide for creating the overlay structure:

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/pla...

 

Use the below to add/hide/change properties

https://experienceleague.adobe.com/en/docs/experience-manager-65/content/implementing/developing/pla...

Avatar

Level 3

@gkalyan thanks for the urls, I already went through them.
This is what I have in JCR for the overlay in /apps:
Screenshot 2025-01-13 at 20.54.09.png

 

 

 

And in /libs:

Screenshot 2025-01-13 at 20.55.25.png

 

I have the same structure, but the nodes from /libs/.. (e.g. branding) are not displayed.
I still don't see why they would not be shown.

Avatar

Community Advisor

Hi @pnagy , not sure if complete overlay to apps is required to add to page properties basic tab. You can point your /apps/project/components/page/content.xml to  core/wcm/components/page/v3/page. (Similar to this wknd example)
and add a cq:dialog node under your 'page' node. Under that you can add the structure you have mentioned above.

 

this should merge the properties and show the custom added properties and the ootb coming from page v3

Avatar

Level 3

Hi @Shubham_borole ,
so you mean it's not possible to add new properties to core/wcm/components/page/v3/page's dialog's basic tab under /apps/core/wcm/components/page/v3/page/_cq_dialog/.content.xml without redefining the existing ones?

Avatar

Level 6

Hi @pnagy, I would suggest you to make your own custom component and set its resourceSuperType to the OOTB page component.
Then download the OOTB page package dialog by making a package from crxde and copy the whole code and paste in the _cq_dialog >.content.xml of your custom component and make your changes in that.