Hi, I am currently moving from kirby to grav and do struggle with nextSibling.
The page structure of my radio archive looks like this
1991
|- 01.01.91
|- 08.01.91
|- …
|- 28.01.91
1992
|- 02.01.92
|- 09.01.92
|- …
|- 29.12.92
What I want to do is on each of the subpage show a link and title to the next and if possible previous sibling. What I am currently able to do is get all siblings but not the previous and next one.
I know this code snippet is not correct but I just cannot wrap my head around how to get a simple page.nextSibling().title
{% set options = { items: {'@self.siblings':''}, 'limit': 10, 'order': {'by': 'date', 'dir': 'desc'}} %}
{% set my_collection = page.collection(options) %}
<h3>Siblings</h3>
<ul>
{% for p in my_collection %}
<li><a href="{{ p.url }}">{{ p.title }}</a></li>
{% endfor %}
</ul>