Blueprint - Select Children of Children


I need to get the children of children in the Panel for a Select Field.

So my question: How can I get the children of a folder with a dynamic UID?

My Setup:

- static-uid-maincategory/
 - static-uid-subcategory/
   - dynamic-uids-first/
    - dynamic-uid-items-first
    - dynamic-uid-items-second
    - dynamic-uid-items-third
   - dynamic-uids-second/
    - dynamic-uid-items-first
    - dynamic-uid-items-second

At the moment I can only get the “dynamic-uids-first” and “dynamic-uids-second” as they are children of a folder with a static UID.

You can use $page->grandchildren() or in this case page('static-uid-maincategory/static-uid-subcategory')->grandchildren()

How exactly would I do this in my blueprint?

      page: static-uid-maincategory/static-uid-subcategory
      fetch: page->grandchildren
      value: '{{title}}'
      text: '{{title}}'
      flip: true

Oops, the grandchildren option does not seem to exist for blueprints… :cry:

Edit: Maybe you can fetch all pages and filter by template, if your grandchildren have a unique template, like this:

    label: Category
    type: select
    options: query
      fetch: pages
      template: dynamic-uid-items-template

That’s it! Thank you so much!