Add
sling: hideChildren property
in the dialog box of the child component.
You can add this property to the immediate parent of the specific field / set / field of the field that you want to hide.
Syntax:
Property Name: sling: hideChildren
Property Type: String or String []
Property Value: Name of immediate children, * hides them all
Example:
To hide all fields in the properties tab in the dialog below:
<content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <fixedcolums jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured"> <properties jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <startLevel jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" ../> <showHidden jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" ../> </items> </properties> </items> </fixedcolums> </items> </content>
add the sling: hideChildren property to its immediate parent node element, i.e. elements (see below)
<content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <fixedcolums jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured" sling:hideChildren="*"> <properties jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <startLevel jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" ../> <showHidden jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" ../> </items> </properties> </items> </fixedcolums> </items> </content>
to hide only the startLevel field, add the sling: hideChildren property to its immediate parent node (see below)
<content jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured"> <fixedcolums jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/fixedcolumns"> <items jcr:primaryType="nt:unstructured"> <properties jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/container"> <items jcr:primaryType="nt:unstructured" sling:hideChildren="startLevel"> <startLevel jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/numberfield" ../> <showHidden jcr:primaryType="nt:unstructured" sling:resourceType="granite/ui/components/coral/foundation/form/checkbox" ../> </items> </properties> </items> </fixedcolums> </items> </content>
Karttik mishra
source share