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

  • I don't quite understand your problem.. what are you trying to achieve?
    – Gatogordo
    Commented Mar 18, 2022 at 9:34
  • using sort order arrange the items in Content editor.
    – Ashu
    Commented Mar 18, 2022 at 9:42
  • And what's wrong with the default options as described here: horizontal.blog/2016/03/11/sorting-items-in-sitecore ?
    – Gatogordo
    Commented Mar 18, 2022 at 9:50

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/… Commented 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
    Commented 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
    Commented 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.