I like to list all pages with a specific template name in a pages section. Not sure what I am doing wrong. Kirby version: 3.9.1. I tried the following:
locations:
headline: Locations
type: pages
query: site.index.filterBy('template', 'in', ['locations-single', 'locations-single-coming'])
create: false
locations:
headline: Locations
type: pages
query: site.index.filterBy(template', '*=', 'locations-single)
create: false
texnixe
February 21, 2023, 11:01am
2
Your second example has some quotes missing.
But you want to use intendedTemplate
instead of template
.
I tried your suggestion but still no results.
I also pasted the rest of the blueprint, maybe I am doing something wrong there
I used parent: site.find('home')
before. But now I need only specific templates, not all children.
title: Homepage
icon: π
columns:
- width: 2/3
sections:
locations:
headline: Locations
type: pages
query: site.index.filterBy('intendedTemplate', 'in', ['locations-single', 'locations-single-coming'])
create: false
locations:
headline: Locations
type: pages
query: site.index.filterBy('intendedTemplate', '*=', 'locations-single')
create: false
texnixe
February 21, 2023, 12:08pm
4
You are using sections and sections donβt have a query property, only a parent. You would have to use a plugin:
1 Like