Expand my Community achievements bar.

Don’t miss the AEM Skill Exchange in SF on Nov 14—hear from industry leaders, learn best practices, and enhance your AEM strategy with practical tips.
SOLVED

style system - dynamically adding the styles tab on the dialog

Avatar

Level 4

Hello,

could someone help me the below please?

Have updated styles for the teaser component under policy & dialog also getting updated with the style tab along with the styles added in the policies. May I know is it possible to change the order of the style tab? Currently its coming before the link & actions tab. But I want to add it at starting as a first tab. Kindly suggest.

 

Thank you

1 Accepted Solution

Avatar

Correct answer by
Community Advisor

Hi @Lakshmi9,

This is possible. You can use Sling Resource Merger functionality:

In your proxy component you should add cq:dialog structure like this:

<cq:dialog jcr:primaryType="nt:unstructured">
    <content jcr:primaryType="nt:unstructured">
        <items jcr:primaryType="nt:unstructured">
            <tabs jcr:primaryType="nt:unstructured">
                <items jcr:primaryType="nt:unstructured">
                    <cq:styles jcr:primaryType="nt:unstructured" 
                        path="/mnt/overlay/cq/gui/components/authoring/dialog/style/tab_edit/styletab"
                        sling:orderBefore="image" 
                        sling:resourceType="granite/ui/components/coral/foundation/include"/>
                </items>
            </tabs>
        </items>
    </content>
</cq:dialog>

and the result:

sling-reorder.jpg

View solution in original post

1 Reply

Avatar

Correct answer by
Community Advisor

Hi @Lakshmi9,

This is possible. You can use Sling Resource Merger functionality:

In your proxy component you should add cq:dialog structure like this:

<cq:dialog jcr:primaryType="nt:unstructured">
    <content jcr:primaryType="nt:unstructured">
        <items jcr:primaryType="nt:unstructured">
            <tabs jcr:primaryType="nt:unstructured">
                <items jcr:primaryType="nt:unstructured">
                    <cq:styles jcr:primaryType="nt:unstructured" 
                        path="/mnt/overlay/cq/gui/components/authoring/dialog/style/tab_edit/styletab"
                        sling:orderBefore="image" 
                        sling:resourceType="granite/ui/components/coral/foundation/include"/>
                </items>
            </tabs>
        </items>
    </content>
</cq:dialog>

and the result:

sling-reorder.jpg