0

I am using collections to sort list of blog entries:

---
title: Noticias
content:
    items: '@self.children'
    order:
        by: header.date
        dir: asc
    pagination: true
    limit: 10
---

All my page dates have the following format:

---
title: 'Test Page'
date: '15-09-2015 13:00'
taxonomy:
    category:
        - Noticias
---    
Content...

So the listing is done incorrectly, as 28-05-2005 goes after 15-05-2017.

What shall be done in Grav to sort a collection taking into consideration date format? Specifically, sort entries using dd-mm-yyyy hh:mm format?

M.E.
  • 4,955
  • 4
  • 49
  • 128

1 Answers1

0

There's are a couple places you might be seeing this as a hangup

In your site configuration, you should have an entry for Page date format. The default is Guess Automatically which includes an option for the date you have shown in your example. Make sure that this is set to either Guess Automatically or the appropriate option.

The second option is within your page overrides. Go to the parent page (such as blog) and then click on the advanced tab. The first entry under Overrides is Page date format. Make sure this isn't checked, or that the selection is the date format you want.

Jacobm001
  • 4,431
  • 4
  • 30
  • 51