Expand my Community achievements bar.

July 31st AEM Gems Webinar: Elevate your AEM development to master the integration of private GitHub repositories within AEM Cloud Manager.
SOLVED

How to control the order of dialog fields

Avatar

Level 2

When I created a dialog which inherit from another dialog I have seen that sometimes the order of the nodes doesn't correspond to the order in which the fields are rendered in the dialog. Is there a way in which I can specify exactly where a field should be rendered?

1 Accepted Solution

Avatar

Correct answer by
Level 10

Only way is to define JCR nodes - dialogs are rendered based on the way nodes are structured. Watch part 3 in this video series here to see how nodes in a dialog and the order of the fields in the dialog are related: Scott's Digital Community: Guided Journey for Using Granite Resources Types in Experience Manager Co...

View solution in original post

2 Replies

Avatar

Correct answer by
Level 10

Only way is to define JCR nodes - dialogs are rendered based on the way nodes are structured. Watch part 3 in this video series here to see how nodes in a dialog and the order of the fields in the dialog are related: Scott's Digital Community: Guided Journey for Using Granite Resources Types in Experience Manager Co...

Avatar

Level 2

We can add sling:orderBefore attribute to component dialog field.

Syntax: sling:orderBefore=<--Node-Name-->

Ex: sling:orderBefore="parentPage"

Here parentPage is input field node, Now when you apply sling:orderBefore attribute, then that field will show top of parent page input field.

Thanks for reading.