How are Content Fragment Lists sorted if multiple Fragments have the same value for the Order By Field? | Community
Skip to main content
Level 2
December 2, 2022
Solved

How are Content Fragment Lists sorted if multiple Fragments have the same value for the Order By Field?

  • December 2, 2022
  • 2 replies
  • 1173 views

I am using a Content Fragment list component(v1) to display content fragments, and I have set the Order By field.

If multiple content fragments have the same value for this field, what order will they be in? Will they be randomly sorted, or sorted by some other fields like Created

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 arunpatidar

Hi,

It depends on the parent node. If parent node is node support the order then alphabetical order will be followed e.g sling:OrderedFolder otherwise the order of creation e.g. sling:Folder

2 replies

arunpatidar
Community Advisor
Community Advisor
December 2, 2022

Hi @coldbuffalo
It is not possible to use more than one sort order.

If the two CF have the same sort value then the ordering is the node in the tree/AEM.

Arun Patidar
Level 2
December 5, 2022

Thank you for your explanation. Could you please explain how the order of nodes in the tree is determined? Is it based on the order they are created, or the alphabetical order of their names?

arunpatidar
Community Advisor
arunpatidarCommunity AdvisorAccepted solution
Community Advisor
December 5, 2022

Hi,

It depends on the parent node. If parent node is node support the order then alphabetical order will be followed e.g sling:OrderedFolder otherwise the order of creation e.g. sling:Folder

Arun Patidar
Mohit_KBansal
Adobe Employee
Adobe Employee
December 2, 2022

If the values are the same of the field selected for Order By, then their node hierarchy will be used to define precedence.