I have a large number of articles/posts, each containing several photos. The articles are grouped by year.
2023
- Article 3
- Article 2
- Article 1
…
2022
- Article 4
- Article 3
- Article 2
- Article 1
…
I would like to display all the photos of the individual articles from each year on one page, with links to the previous/next year. The most recent year should be used as the homepage.
What is the best/most elegant solution for this? Should I create a directory below Home for each year and then place the individual articles there? How can I then use the page of the most recent year as the homepage? Or is a completely different approach more sensible, working with collections and filters or similar? I am completely flexible with the structure, I just want to do it “right” from the start.
Many thanks in advance.
So 2023 etc. are already pages?
Then on the home page you can fetch the lastest year’s children, and the other years already exist as pages and you don’t have to do anything in particular? Or is this about the images only, and the current pages should continue to exist as before?
Thank you very much for your answer. After doing some more research last night and, above all, sleeping on it for a night: I will first try out your Load more recipe. The reason for splitting it up over years was primarily performance - and that could be solved even more elegantly via Load more. I will test it and report back 
Update: I have implemented your Load more recipe (Load more with Ajax | Kirby CMS), works very well. This means that “pagination” per year is no longer necessary. I still store my individual articles in folders per year to keep an overview. On the homepage I fetch the photos from the individual articles via $page->grandChildren()
Somehow fumbling my way through Kirby as a non-developer always makes me very proud. Thank you very much for these small triumphs 
1 Like