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
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.
-
when i add "query:./*;sort:published" there are no results returned at all, do you have another idea? Commented Sep 17, 2018 at 12:49
-