The inherited page properties tab is appearing in the current page properties. We have to hide it. Please suggest.
Solved! Go to Solution.
Views
Replies
Total Likes
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>
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"/>
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>