How to control the order of dialog fields

carloso98118279

06-07-2018

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?

Accepted Solutions (1)

Accepted Solutions (1)

smacdonald2008

06-07-2018

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...

Answers (1)

Answers (1)

rajkumarsamala

26-05-2020

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.