Filter pages by category in blueprint

Hey,
i want to display a pages-section with the template “example” and the catergory “nature” and a pages-section with the template “example” and the catergory “city” in the panel.

blueprint:

pages_cat_nature:
  type: pages
  layout: cardlets
  query: ?? ??
  image:
    query: page.heroimg.toFile
    cover: true
    ratio: 1/1
  templates:
    - example

pages_cat_city:
  type: pages
  layout: cardlets
  query: ?? ??
  image:
    query: page.heroimg.toFile
    cover: true
    ratio: 1/1
  templates:
    - example

I have tried various solutions here from the forum, but all pages with the template “example” are always displayed.

Thank you for your help.

Sections cannot be filtered with a query, use PagesDisplay Section | Kirby CMS

@pixelijn thank you :+1: :pray:
That is what i need!

Note that you need an additional drafts section to still be able to create pages (because the pagesdisplay section disabled this feature).

The alternative would be to extend the plugin.

1 Like