Blueprints: How to list different collections for each section?

Hi
I try to divide a blueprint into multiple sections of pages like this:

Result:

As you can see it always lists the the pages of the last “parent-query” (speisekarte/desserts) for all sections.

Question 1
How can I output different collections of pages for each section?

Question 2
Is it better to put all dishes in one folder and add a category like “vorspeisen, hauptspeisen, …” to each dish instead of distribute the dishes into subfolders without categories?

Kind regards
Alain

Try site.find('vorspeisen') etc…

Or maybe a more specific query chainging children and another find onto it.

site.find('speisekarte').children.find('vorspeisen')

To my knowledge, find() is looking for a specific page UID rather than a path to a page, so I think you need to be a little more specific.

The problem here is not the path, which is correct, otherwise the desserts wouldn’t work either, but that your sections use the same key (pages), so the last one overrides the first.

Keys must be unique, no matter if it’s fields, or sections, or columns.

@Alain Please post your blueprints and other code as code, not as screenshots. Otherwise, we cannot copy&paste corrections.

Duh… didnt spot that :slight_smile:

Great, it works now :slight_smile:

I guess it’s better do write it even more simple like this (removed the second “sections”):

title: Speisen
columns:
  Speisen:
    sections:
      vorspeisen:
        type: pages
        headline: "Vorspeisen"
        parent: site.find("speisekarte/vorspeisen")
        info: "CHF {{ page.preisklein }} / CHF {{ page.preisgross }}"
      desserts:
        type: pages
        headline: "Desserts"
        parent: site.find("speisekarte/desserts")
        info: "CHF {{ page.preisklein }} / CHF {{ page.preisgross }}"

What about my second question?

There is no right or wrong. However, if you want to separate your sections in the Panel like you do and if you also want the categories in the URL, your current setup makes absolute sense.

Ok, thanks pixelijn.