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 ...
- 1,393
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 ...
- 7,071
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]) %}
- 2,492
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.
- 6,318
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']) %}
- 66.9k
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
multisort × 4array × 3
filter × 2
sort × 2
relatedto × 1
elementquery × 1
plugin-sprig × 1