Hi Team,
I would like to hide some fields in page properties dialog. which is coming from OOB page properties.
for example: hide SEO [OOB] option from Advanced Tab in page properties dialog.
Scenario:
I have created a page by inheriting core/cif/components/structure/page/v1/page
which is then inheriting from "/libs/core/wcm/components/page/v3/page"
which is finally inheriting from: "/libs/wcm/foundation/components/basicpage/v1/basicpage"
So, my Adnavced tab is coming from: /libs/wcm/foundation/components/basicpage/v1/basicpage/cq:dialog/content/items/tabs/items/advanced
i.e. /libs/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced
Now requirement here is to Hide SEO from Advanced tab.
I tried to copy the advanced tab and SEO node and used sling:hideResource true to hide, but then I cannot see any fields in Advance tab.
So how to hide only SEO node from OOB Advanced tab.
@kautuk_sahni @arunpatidar @Vijayalakshmi_S @Himanshu_Singhal
Solved! Go to Solution.
Views
Replies
Total Likes
1. Create a dialog cq:dialog
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"> <content jcr:primaryType="nt:unstructured"> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured"> <items jcr:primaryType="nt:unstructured"> <advanced jcr:primaryType="nt:unstructured" path="/mnt/override/apps/aemlab/components/page/tabs/advanced"/> </items> </tabs> </items> </content> </jcr:root>
2. Create a tabs node with advanced tab and hide as a resource e.g. configuration properties
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"> <advanced jcr:primaryType="nt:unstructured" jcr:title="Advanced"> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <configuration jcr:primaryType="nt:unstructured" sling:hideResource="{Boolean}true"/> </items> </column> </items> </advanced> </jcr:root>
1. Create a dialog cq:dialog
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"> <content jcr:primaryType="nt:unstructured"> <items jcr:primaryType="nt:unstructured"> <tabs jcr:primaryType="nt:unstructured"> <items jcr:primaryType="nt:unstructured"> <advanced jcr:primaryType="nt:unstructured" path="/mnt/override/apps/aemlab/components/page/tabs/advanced"/> </items> </tabs> </items> </content> </jcr:root>
2. Create a tabs node with advanced tab and hide as a resource e.g. configuration properties
<?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0" jcr:primaryType="nt:unstructured"> <advanced jcr:primaryType="nt:unstructured" jcr:title="Advanced"> <items jcr:primaryType="nt:unstructured"> <column jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <configuration jcr:primaryType="nt:unstructured" sling:hideResource="{Boolean}true"/> </items> </column> </items> </advanced> </jcr:root>
Thank you It worked
There are no Adobe documentation for this specific use case but you can follow the implementation of supertype page resource. there tabs are included via path.
here we just did the same
In OOTB advanced node of cq:dialog - /libs/wcm/foundation/components/basicpage/v1/basicpage/cq:dialog/content/items/tabs/items/advanced, is included using "include resource" with path being mount overlay path - /mnt/overlay/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced
Mount overlay path works by merging resources using search paths - That is per this path, it will first look in /apps/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced. If there is no resource there, then it will look in /libs/wcm/foundation/components/basicpage/v1/basicpage/tabs/advanced.
This gives us an another option of amending the advanced tab by overlaying it to apps.
Solution shared by @arunpatidar based on Mount override works by merging resources based on super type.
Official documentation for reference : https://experienceleague.adobe.com/docs/experience-manager-64/developing/platform/sling-resource-mer...
Views
Likes
Replies
Views
Likes
Replies