Hide inherited page tab in 6.5 | Community
Skip to main content
This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Kishore_Kumar_
Kishore_Kumar_Accepted solution
Level 9
Aug 10, 2021 12:59 AM UTC

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

Kishore_Kumar_
Kishore_Kumar_Accepted solution
Level 9
Aug 10, 2021 12:59 AM UTC

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>

 

 

 

Translate
Shubham_borole
New Participant
Aug 9, 2021 8:58 PM UTC

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"/>
Translate