Hide inherited page tab in 6.5 | Community
Skip to main content
Dinu_Arya
Level 6
August 9, 2021
Solved

Hide inherited page tab in 6.5

  • August 9, 2021
  • 2 replies
  • 2385 views

The inherited page properties tab is appearing in the current page properties. We have to hide it. Please suggest.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by Kishore_Kumar_

Hi @dinu_arya 

 

We need to use Sling Resource Merger Properties of AEM. If we need to hide a tab on a child page component, use sling:hideResource="{Boolean}true" property on the child page component tabs.

 

Suppose if we have tab called custom-tab on parent node.

 

 

 

<custom-tab jcr:primaryType="nt:unstructured" jcr:title="Custom Tab" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <custom-property jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldLabel="Custom Property" name="./customProperty"/> </custom-tab>

 

 


and If we don't want this tab to appear on inherited page components, add sling:hideResource="{Boolean}true" like below

 

 

 

<custom-tab jcr:primaryType="nt:unstructured" jcr:title="Custom Tab" sling:hideResource="{Boolean}true" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> </custom-tab>

 

 

 

2 replies

Shubham_borole
Community Advisor
Community Advisor
August 9, 2021

Hello @dinu_arya 

Please try updating the cq:dialog of the child page template. Use the same node structure as you parent page cq:dialog and add the property nodes that are not needed for current page with following

 

Parent/base template <testprop cq:showOnCreate="{Boolean}true" jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/foundation/form/checkbox" defaultChecked="false" fieldDescription="Check this box" name="./testprop" text="Disable?" value="true"/> Child template <testprop jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/hidden"/>
Kishore_Kumar_
Kishore_Kumar_Accepted solution
Level 9
August 10, 2021

Hi @dinu_arya 

 

We need to use Sling Resource Merger Properties of AEM. If we need to hide a tab on a child page component, use sling:hideResource="{Boolean}true" property on the child page component tabs.

 

Suppose if we have tab called custom-tab on parent node.

 

 

 

<custom-tab jcr:primaryType="nt:unstructured" jcr:title="Custom Tab" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <custom-property jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/textfield" fieldLabel="Custom Property" name="./customProperty"/> </custom-tab>

 

 


and If we don't want this tab to appear on inherited page components, add sling:hideResource="{Boolean}true" like below

 

 

 

<custom-tab jcr:primaryType="nt:unstructured" jcr:title="Custom Tab" sling:hideResource="{Boolean}true" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> </custom-tab>