You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The entries are a combined array of objects. I'm outputting each date into a data attribute on each exhibition:
I would like to order these by most recent date to oldest on the page, but I haven't figured out a way to do this yet.
Have tried various combinations of passing the date into the sort function, but nothing has worked.
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{exhibitionDate.first.date|date}') %}
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{{object.exhibitionDate.first.date|date}') %}}
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{{object.exhibitionDate.date|date}') %}}
I've tried it with and without the date filter, all sorts of other syntax, but it never seems to properly sort by date.
Wondering if anybody might have any insight into the proper syntax here? exhibitionDate does exist for each object, as evidenced by the data attribute in the above screenshot.
Thanks!
The text was updated successfully, but these errors were encountered:
Hi,
I'm using supersort to try and sort the entries on this page:
https://catrionajeffries.com/artists/valerie-blass/exhibitions
The entries are a combined array of objects. I'm outputting each date into a data attribute on each exhibition:
I would like to order these by most recent date to oldest on the page, but I haven't figured out a way to do this yet.
Have tried various combinations of passing the date into the sort function, but nothing has worked.
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{exhibitionDate.first.date|date}') %}
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{{object.exhibitionDate.first.date|date}') %}}
{% set sortedExhibitionEntries = combinedExhibitionEntries | supersort('rsortAs', '{{object.exhibitionDate.date|date}') %}}
I've tried it with and without the date filter, all sorts of other syntax, but it never seems to properly sort by date.
Wondering if anybody might have any insight into the proper syntax here?
exhibitionDate
does exist for each object, as evidenced by the data attribute in the above screenshot.Thanks!
The text was updated successfully, but these errors were encountered: