Previous / Next navigation becomes random navigation

I have a glossary for which each article contains a Previous / Next navigation:

The articles are sorted alphabetically by the headline. This works perfectly in the German and English version.

In the English version, however, the Previous / Next navigation is oriented after the German headings and the sorting of the Previous / Next navigation is messed up.

I have a similar problem with the blog: The articles are sorted by date. The newest article is on the first place. I had to invert the Previous / Next navigation to get the order right. Prev is now Next and Next is Prev. :thinking:

I have the suspicion that the Previous / Next navigation needs an additional sorting, or have I lost the thread?

That is absolutely correct. If you are sorting or filtering your collection by anything , then you need to pass the sorted collection to the methods as parameters as indicated in the documentation, see $page->next() | Kirby CMS

Guess the cookbook recipe could do with an update.

1 Like

Thanks for your quick reply.
However, the link takes me to an :x: error page…

Try again, was on my local copy

1 Like

Not only the link works now, but also my sorting and understanding on the subject.
Thanks a lot :bouquet:

there is also an option to take that sorting to the panel.

title: Simple Page
navigation:
  status: listed
  template: default
  sortBy: title asc # <--- here