Hi,
I'm new to grav and looking for a way to add subpages of a particular parent-page (not the current page) in the sidebar of my layout.
Can someone point me in the good direction?
Thanks in advance
Community guidelines
Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.
Support
Solved by Greet Peirelinck View solution
I found the folowing solution that works for me.
TWIG
`{% for page in page.find('/page/subpage').children()%}`
`<a href="{{ page.url }}">{{ page.title }}</a><br>`
`{% endfor %}`
last edited 02/08/19 by Greet Peirelinck
Log in to reply.
Suggested topics
| Topic | Participants | Replies | Views | Activity |
|---|---|---|---|---|
| 2 | 52 | 9 hours ago | ||
| 2 | 59 | 11 hours ago | ||
| 1 | 30 | 12 hours ago | ||
| 2 | 65 | 5 days ago | ||
| 2 | 56 | 5 days ago |