Retrieve sub-pages with specific template and published only

Hello,
Currently, I’m doing the following loop to get sub-pages :slight_smile:

{% for p in page.find('/projets').children %}

However, this also list pages which are not published. Is it possible to only list the published project ? Moreover, each sub-page has a specific page template called “Projet” (in case it can be used in the loop somehow).

Thanks for your help.

Yann

You can use:
{% for p in page.find('/projets').children().published() %}

Don

2 Likes