0

I need to sort items returning from a query inside a variant. For example query:.//*[@@templatename='Template']. I need to sort these items since it doesn't work through build query. Any ideas?

1 Answer 1

4

While using Variant Query you can use:

  • normal Sitecore query
  • Sitecore content search query

Try something like this:

+template:{7826b36e-d813-40cf-aa33-26132ff2dad6};sort:published
+template:{7826b36e-d813-40cf-aa33-26132ff2dad6};sort:published[desc]

where published is field of an item. Use your field there.

2
  • when i add "query:./*;sort:published" there are no results returned at all, do you have another idea?
    – Basant A.
    Commented Sep 17, 2018 at 12:49
  • Try to use Content Search query. Commented Sep 17, 2018 at 13:38

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.