How can we implement sort order functionality in template in Sitecore SXA? For example : We have three item in Sitecore Content editor :

**Name**    **Sort Order**
Test 1          1
Test 2          2
Test 3          0

If we select sort order in this way then the content editor structure will be like this:

Test 3
Test 1
Test 2

We have same functionality in Appearance tab , need the same implementation when we would add it in template field..


1 Answer 1


I have modified my first answer following the comments of Michael West and Mark Cassidy in relation to the end of use of the Sitecore fast query but also because I think you don't need code for that. So I agree with Gatogordo. I think you can handle the order of child elements in the sub-element sorting section.

enter image description here Gatogordo

enter image description here

  • 1
    I would highly encourage you to move away from the this approach as "fast" as possible. Fast Queries are no longer a feature recommended by Sitecore. sitecore.stackexchange.com/questions/16203/… intothecloud.blog/2018/10/21/… Mar 18, 2022 at 13:24
  • 3
    It's not about "being recommended". Fast queries are flat out no longer possible, from Sitecore 10 onwards.
    – Mark Cassidy
    Mar 18, 2022 at 13:26
  • Thank you guys for your comments I was unfortunately not aware of this information. good to know. To be honest, today I'm using version 9 update 2 and I'm still using the fast query. Now I know have what I need to do :)
    – Taha
    Mar 18, 2022 at 16:31

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.