1

I want to display pages in reverse chronological order based on page's name. Is there an easier way to do this than changing the page names?

Here is the Kirby's example. /content/blog/20121212-my-first-article /content/blog/20132206-a-second-article /content/blog/20142806-the-latest-article

I want the latest post – 20142806-the-latest-article – to be displayed first.

Dominique Vial
  • 3,729
  • 2
  • 25
  • 45

1 Answers1

1

There is a kirby method named flip: <?php $articles = $page->children()->flip() ?>

https://getkirby.com/docs/cheatsheet/pages/flip

François Romain
  • 13,617
  • 17
  • 89
  • 123