I am wondering if there is a way to list the child or sibling pages of a page automatically. For example under About section has sub pages:
Mission | History | Staff | Contact
With the loop below I can see those sub-pages when I am on the About page. But when I got to one of the sub-pages I want that to remain so it would be displaying sibling pages of the About parent page.
<Loop field=children>
<strong><a href="{Field url}"><Field title /></a></strong>
</Loop>
And can this be done to show on all parent pages or does it have to be done on a page by page basis (if it’s possible)?
I’m sure there are several different ways to approach this and I can’t guarantee that the one I’ve thought of is the best, but here’s where my head’s at. Basically what’s going on here is that if there are no children associated with the current page, I’m looping through the children field of the current item’s parent. I’m doing that using the parent_* field which is mentioned in the post loop docs:
parent_* - Parent field where the asterisk can be replaced with any field from the post loop such as parent_title