Skip to content

Timeline in incorrect order within a block #138

Answered by evanwill
tprus-luc asked this question in Q&A
Discussion options

You must be logged in to vote

@tprus-luc sorry, on the "sort" I left out the field to add, it should look like:
{%- assign inYear = items | where_exp: 'item', 'item[field] contains year' | sort: 'date' -%}

adding that will actually sort them based on your date field (keep in mind, it is not parsing the dates, just sorting them alphabetically, which will work if your dates are yyyy-mm-dd, but won't work if they are say yyyy-m-d or d-m-yyyy).
By default, it is not sorting by objectid, it is just the order in the CSV (so more or less sorting by the index number in the spreadsheet).

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@tprus-luc
Comment options

@evanwill
Comment options

Answer selected by tprus-luc
@tprus-luc
Comment options

@evanwill
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants