Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Would ordering by date work in my case?

Started by Alexander Kim 9 years ago · 2 replies · 699 views
9 years ago

I have set default format for dates as d.m.Y - 11.07.2012

What if i will have 10 pages created within the same day, how ordering will work with this? 10 pages have the same creation date, how Grav can order them?

9 years ago

I think it would then order alphabetically by file folder name, maybe by defined slug. I double checked the docs and I don't see anything about multi-factor sorting. In the past I've done that manually in my Twig, working with the Collections object directly.

9 years ago

Maybe it's better to use unix date format, then reformat it with twig?

Suggested topics

Topic Participants Replies Views Activity
General · by Andy Miller, 1 week ago
0 134 1 week ago
General · by lynbor, 1 month ago
3 452 2 weeks ago
General · by lynbor, 3 weeks ago
7 586 2 weeks ago
General · by Harry, 2 weeks ago
0 174 2 weeks ago
General · by Old Man Umby, 1 month ago
2 316 4 weeks ago