I am trying to loop through all the pages on the same level as the current page the user is on. Grav docs say I can use ‘@self.siblings’ to achieve this, so I have written the following:
{% for page in page.self.siblings %}
<li>
<a href="{{ page.url }}">
{{ page.menu }}
</a>
</li>
{% endfor %}
However, when I load the page, no items come up in the navigation bar. Anyone know how I can fix this? Thank you!
I tried {{ dump(page.parent.children.remove(page.path)) }}, but it didn’t give me a siblings array. How can I get page.siblings to work, or loop through all the pages on one level?