How to prevent cq: inheritance of dialogs

I transfer the classic ui dialogs to touch the ui dialogs, I migrate the dialog of the parent component, I noticed that AEM shows the tabs of the parent dialogs and properties in the child component. In existing classic ui dialogs, it does not inherit parental properties, while in ui touch it does.

How can we achieve the same classic ui behavior with respect to ui by preventing the inheritance of dialogs.

Please share information if anyone has information on this issue.

+7
touch dialog aem
source share
4 answers

You can use the sling:hideChildren property to hide inherited tabs and properties. For example, let's say you wanted to hide the inherited permissions and cloudservices and configure the basic and advanced tabs:

 ... <items jcr:primaryType="nt:unstructured"> <tabs ...> <layout .../> <items jcr:primaryType="nt:unstructured" sling:hideChildren="[permissions,cloudservices]"> <basic .../> <advanced .../> </items> </tabs> </items> ... 
+12
source share

Merging Sling resources with AEM documents can be found here . In particular, review the documents for resource merging properties and how you can manipulate various properties.

Resource merging provides the following properties:

sling: hideProperties (string or string []) Specifies the property or list of properties that you want to hide. The wildcard character * hides everything.

sling: hideResource (Boolean) Indicates whether resources, including its children, should be completely hidden.

sling: hideChildren (String or String []) Contains a child of a node or a list of child nodes to hide. Node properties will be saved. The wildcard character * hides everything.

sling: orderBefore (String) Contains the name of the sibling node, in front of which the current node should be placed.

These properties affect how the corresponding / source resources / properties (from / libs) are used by the overlay / override (often in / apps).

+7
source share

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> 
+2
source share
+1
source share

All Articles