Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

how to prevent cq:dialog inheritance

Tags:

dialog

touch

aem

I am migrating classic ui dialogs to touch ui dialogs, I migrated the parent component dialog, I observed AEM is showing the parent dialogs tabs and properties in the child component as well. In the existing classic ui dialogs it doesnt inherit the parent properties whereas in the touch ui it does.

How can we achieve the same classic ui behavior in touch ui as well by preventing the dialog inheritance.

Please share details if anyone has information about this issue.

like image 315
Sandeep Rawat Avatar asked Sep 17 '15 04:09

Sandeep Rawat


People also ask

How do you inherit dialog in AEM?

Extending tab or individual widget in dialog is very easy in AEM as everything is stored in JSON format. Just set a particular widget 's xtype to cqinclude and extend the path down to the individual widget level too, i.e. This will inherit the whole dialog.

Which property of Sling merger indicates whether the resources should be completely hidden including its children?

The wildcard * hides all. Indicates whether the resources should be completely hidden, including its children.


2 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 tabs, and customize 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>
...
like image 102
Bruce Lefebvre Avatar answered Sep 22 '22 12:09

Bruce Lefebvre


Sling Resource Merging with AEM docs can be found here. Specifically look through the docs for the resource merger properties and how you can manipulate different properties.

The resource merger provides the following properties:

sling:hideProperties (String or String[]) Specifies the property, or list of properties, to hide. The wildcard * hides all.

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

sling:hideChildren (String or String[]) Contains the child node, or list of child nodes, to hide. The properties of the node will be maintained. The wildcard * hides all.

sling:orderBefore (String) Contains the name of the sibling node that the current node should be positioned in front of.

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

like image 21
Ben Helleman Avatar answered Sep 21 '22 12:09

Ben Helleman