Dashboard Blueprint — accessing Page contents

Hello,

I am stuck and unfortunately neither the documentation nor the starter kit could help me out.
I want to essentially build a dashboard where all the entries of my two pages “work” and “exhibitions” are shown. I guess i have to access the contents of those Pages somehow. How do i do that?

This is my blueprints tree so far:

site.yml
- works.yml <-- i want to access all "work" entries. 
--- work.yml
- exhibitions.yml
--- exhibition.yml <-- i want to access all "exhibition" entries.

Thank you so much in advance!

What have you already tried? Do you want to show those subpages in one pages section or in different ones?

1 Like

I have tried the following approaches:

sections:
      name: templates/template.yml

which throws me an “Invalid section type (“name”)” error.

parent: site.find("works")

which throws me an “Invalid section type” error, too.

parent: kirby.page('works')

Only thing that remotely worked and pointed me into the right direction (i guess).
but i apparently could only use it once per blueprint as it would only either show my works or exhibitions but never both. I guess the problem is i dont quite understand the yml syntax yet and what it demands in certain situations. I feel there is not enough documentation about that.

I don’t know all the right words, but essentially i want to skip the part of showing me my pages in a list (as i only have 2 thats pretty pointless) but instead show what you see when you click on it. In both cases thats a list of all existing pages in those respective folders.

If you check out the Starterkit, site.yml has three pages sections: albums, notes & pages.

The sections for notes and albums are definied in /site/blueprints/sections

You can do it in the same way for your two parent pages work and exhibitions.

1 Like

Thanks! That has worked. But I am running into problems when i try to have either 2 sections in my sections/work.yml or try to call it on the site.yml twice. Is it only possible to use a blueprints/section once?

I am simply trying to use the section twice but filter them for published and drafts.

No, but you have to make sure that your keys are always unique for each section (or field name, tab name etc)
Example: https://github.com/getkirby/starterkit/blob/main/site/blueprints/pages/notes.yml

1 Like