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
Views
Replies
Total Likes
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:
Use the below to add/hide/change properties
@gkalyan thanks for the urls, I already went through them.
This is what I have in JCR for the overlay in /apps:
And in /libs:
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.
Hi @pnagy , not sure if complete overlay to apps is required to add to page properties basic tab. You can point (resourcesuperType it) 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
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?
@pnagy It should be possible and a common usage I mean. However instead of overlaying everything under /apps it would be better to create or use your apps/components/page to point it to or resourcesupertype it to core component page v3. Then under your page add the cq:dialog node with new properties.
Thanks @Shubham_borole , i see the point, that's not the same though, as it creates a new page type with a resourceSuperType.
Views
Replies
Total Likes
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.
Hi
It is not recommended to make updates to the core components. Instead create a page component in your project eg: /apps/<project-name>/components/structure/page for which the sling:resourceSuperType will be core/wcm/components/page/v3/page. And then you can create the cq:dialog under this page component with your additional changes.
Also, there is nothing called libs/core/wcm/components.
To fix the issue of missing fields from /libs/core/wcm/components/page/v3/page/_cq_dialog/content.xml when overlaying the page dialog:
Ensure inheritance: Ensure your overlay doesn't completely replace the fields from /libs. It should inherit from /libs and only add new fields.
Correct overlay path: Verify the overlay is at /apps/core/wcm/components/page/v3/page/_cq_dialog/content.xml.
Keep existing structure: Don’t override the entire <items> or <basic> structure from /libs, as this may hide default fields.
Clear cache: After updating, clear AEM cache and re-activate the page to apply changes.
This ensures the default fields from /libs show along with your custom fields.
@pnagy Did you find the suggestions helpful? Please let us know if you require more information. Otherwise, please mark the answer as correct for posterity. If you've discovered a solution yourself, we would appreciate it if you could share it with the community. Thank you!
Views
Replies
Total Likes
Views
Likes
Replies
Views
Like
Replies