Page.find() - how to exclude modular pages?

Hi,

Grav version : 1.1rc3

I want to publish the latest content (whatever the content type) but so far it includes also some modular pages. Is there a way to exclude modular pages from the page list ?

 {% for page in page.find('/').children.order('date', 'desc').slice(0, 5) %}
            <div class="media-object">
                {% set showcase_image = page.media.images|first.resize(100,100).url %}
                {% if showcase_image %}
                <div class="media-object-section">
                    <img alt="{{ page.title }}" src="{{ showcase_image }}" />
                </div>
                {% endif %}
                
                <div class="media-object-section">
                    <h5><a href="{{ page.url }}">{{ page.title }}</a></h5>
                    
                </div> 
            </div>
            {% endfor %}

I tried to use dump(page) to get more data but I can’t see on what I could filter to exclude modular content.

Thanks,
Nicolas

The .children method returns a Collection of pages. You can then use the .nonModular method to filter out modular pages:

{% for page in page.find('/').children.nonModular.order('date', 'desc').slice(0, 5) %}
---

Thanks a lot, I missed this point !