How to view pages filtered by attribute in blueprint yml


I’m working on a portfolio page and i’d like to see and edit the sorting of my featured projects inside my home page.

I used the portfolio example to create a structure for my portfolio/projects and everything works so far.

I know how to display only the featured project on the frontend, but I also like to show only the featured projects in my panel when I edit the home page, so I can have a) a quick overview which projects are featured and b) to sort them unique explicit for my homepage frontend.

Is this event possible?

Welcome to forum & Kirby @Nerdcel

Yep it is totally possible :slight_smile: I would actually use a pages section for that, rather than a structure field. Then you can use the query language to pull only the featured stuff into it by filtering on a field value (assuming youve stored the featured status in the projects, perhaps with a toggle field or some other way of identifying them). Set the pages section to use cards layout and it will look awesome in the panel.

Let us know how you get on :slight_smile:

@jimbobrjames You can’t filter a pages section and I don’t think @Nerdcel is using a structure field, but subpages.

@Nerdcel There is a plugin you can use to display a selection of pages based on filter criteria. However, that plugin has sorting and adding pages disabled, because otherwise it would easily become a mess. If you query a page selection form the same parent and go about it carefully, it would be possible to add this functionality, though.

Hmm I thought you could doing by chaining a filter onto the of the parent option. That would actually be useful :slight_smile:

No, the parent property has to return a single parent page. That’s why we have the Pagesdisplay plugin… and this ideas issue:

Thank you all for your help.
I ended up using the Kirby-builder Plugin and manually select the featured pages for my home page. This way I am very flexible, can sort the featured pages and select them the way I want.