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?

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.

| improve this answer | |
  • when i add "query:./*;sort:published" there are no results returned at all, do you have another idea? – Basant A. Sep 17 '18 at 12:49
  • Try to use Content Search query. – Dawid Rutkowski Sep 17 '18 at 13:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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