How to control the order of dialog fields | Community
Skip to main content
carloso98118279
New Participant
July 6, 2018
Solved

How to control the order of dialog fields

  • July 6, 2018
  • 2 replies
  • 4515 views

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?

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by smacdonald2008

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 Components

2 replies

rajkumarsamala
New Participant
May 26, 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.

smacdonald2008
smacdonald2008Accepted solution
New Participant
July 6, 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 Components