Closed STOWouters closed 10 years ago
I have the following snippet in my config.php:
config.php
$config['date_format'] = 'j F Y'; $config['pages_order_by'] = 'date'; $config['pages_order'] = 'desc';
And the following meta tags were applied:
<!-- Title: file1 Date: 17 December 2013 -->
<!-- Title: file2 Date: 24 December 2013 -->
<!-- Title: file3 Date: 10 February 2014 -->
So, the files should appear in the following precedence: file3, file2, file1. However, I got file2, file1, file3. It seems that the sorting doesn't take the years into account, or did I do something wrong?
file3
file2
file1
Try using the "Y/m/d" format in the meta. Then format that on the frontend with the Twig date filter.
Thanks, that did it:
{{ current_page.meta.date|date(config.date_format) }}
I have the following snippet in my
config.php
:And the following meta tags were applied:
So, the files should appear in the following precedence:
file3
,file2
,file1
. However, I gotfile2
,file1
,file3
. It seems that the sorting doesn't take the years into account, or did I do something wrong?