Accessing child pages
Created 8 years ago by royallthefourth

Within a template, is it possible to iterate a set of the current page's children? If it's not, is the "multiple" fieldtype what I'm looking for?

ryanthompson  —  8 years ago

You sure can!

{% for child in page.children %}
    {{ child.path }}
{% endfor %}

If you're not within the layout you can access the active page with {{ template.page }} and use it the same way 😊

royallthefourth  —  8 years ago

Thanks!