Return a collection of child elements to the grandparent page and make it editable in the blueprint


In the Reference, i saw that.

I have a Folder Structure like this:

  • Home
    • Collection Folder 1
      • Collection Folder Item 1
      • Collection Folder Item 2
    • Collection Folder 2

I want to return all listed Collection Items of one Collection Folder on the Home-Page.

I did this (home.php):

  <?php foreach(page('CollectionFolder1')->children() as $CollectionItem): ?>
      <h2><?= $CollectionItem->title() ?></h2>
      <p><?= $CollectionItem->text() ?></p>
  <?php endforeach ?>

Also: How can i built a Blueprint for the Home-Page that shows a Pages Section within the CollectionItems and not the CollectionFolders.
In my Backend it just shows my 3 CollectionFolder-Pages…

I have this (home.yml):

    type: pages
    layout: list
    type: pages
    layout: list

This page doesn’t exist, you need to pass the full path to the page to the page() helper, so


Make sure that the slug is typed correctly, you should not use spaces or camelCase in folder names (not possible when pages are created via the Panel anyway).

As regards your second question: You have to set the parent property.

1 Like

Just to make this Post a bit more helpful for everyone.

The Solution for the Subpages in a Blueprint is:

      type: pages
      layout: list
      parent: site.find("home/CollectionFolder")

Source Thread