Get/list pages by section

title: Site

sections:
    mainMenu:
        type: pages
        headline: Main Menu
        template:
            - default
            - about
            - home
            
    topMenu:
        type: pages
        headline: Top Menu
        template:
            - default
            - about
            - home

In my case, i need multiple menus like main, top, footer menu etc…

I want to list pages by section like that:

foreach($page->children()->section('mainMenu') as $subpage)
  • I can’t filter by template because its all use the same templates.
  • I can’t filter by status because its all use the same statuses (listed or unlisted)

Is this possible or should I open it as a new idea on GitHub?

Thanks

Yes, you can do that, but with a pages field, not a pages section.

1 Like

Ahh! I was already use pages fields in somewhere on app. How didn’t it come to my mind? :smile:

I’ve been keeping you busy lately :pray: :palms_up_together: :+1: