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
Views
Replies
Total Likes
@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.
Views
Replies
Total Likes
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
Views
Replies
Total Likes
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?
Views
Replies
Total Likes
@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.
Views
Replies
Total Likes
@pnagy check the location for the above linked wknd project and place the dialog as mentioned in attachment. see if that works
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.
Views
Replies
Total Likes
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.
Views
Replies
Total Likes
Views
Like
Replies