Have you seen our video tutorials? Check 'em out!

Accessing child pages

royallthefourth - 3 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 - 3 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 {{ template.page }} and use it the same way ^_^

royallthefourth - 3 months ago

Thanks!