Accessing child pages

royallthefourth - 6 months ago

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 - 6 months 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 {% for child in page.children %} {{ child.path }} {% endfor %} and use it the same way ^_^

royallthefourth - 6 months ago

Thanks!