I want another loop that -only- shows the latest five posts in a small “Recent Posts” list, but isn’t effected by the pagination, so when I go to page 2, the main list is filtered to the next 5 posts, while this smaller list only shows the most recent 5.
This is my first Kirby project. I’m sorry if this is a stupid noob question.
The best place to add this logic is in a controller, if you are using the Starter Kit you already have it, look at site/controllers/blog.php. You can change it to get the latest 5 articles and store the result in a separate variable before doing the pagination:
Note @pedroborges blog controller as well. I missed a change he made moving the pagination control out of the initial “$articles” = business and my new loop was also being changed by pagination. Follow their suggestions exactly and it’s perfect!