2 votes

Syntax for Multisort Filter

For those of you reading through this post, I thought it might be useful to provide a bit of background on my question. The Craft Docs list "multisort" under Filters and it sounded like something that ...
user avatar
  • 1,311
2 votes
Accepted

Sort entries by separate related entries count

I already responded to your question in a GitHub issue, but here we go again. Once you execute the tuitionLessonsQuery query, you can sort the resulting entries using the multisort filter, before ...
user avatar
  • 6,146
1 vote
Accepted

Help with correct syntax regarding multisort please

Try removing the quotes on 2nd/3rd arguments: {% set rides = furniture|multisort(furniture['price'],[SORT_DESC],[SORT_REGULAR]) %}
user avatar
  • 2,437
1 vote

Multisort flag doesn't seem to work

I think you should change ['SORT_DESC'] to [SORT_DESC]. See this tweet for an example. SORT_DESC is a PHP constant, not a string.
user avatar
  • 6,288
1 vote

Syntax for Multisort Filter

I think this should do what you're looking for: {% for rides in allRides|multisort(['eventDate'],['SORT_DESC'],['SORT_REGULAR']) %}
user avatar
  • 66.4k

Only top scored, non community-wiki answers of a minimum length are eligible