I have a pages field in my site.yml blueprint, where I would like to be able to choose pages with the article template. I tried to set this up, but it does not let me select any pages. The article pages are actually two levels down, so I thought this should work via querying the site.index.
Here is my pages field:
featured:
label: Featured
type: pages
layout: cards
query: site.index.filterBy('template', 'article')
There are listed pages with the article template (see screenshot):
yet, when I click the add button on the pages field, it tells me there is no pages:
Is there something else I am missing?
This is in Kirby 3.6.2
hi @texnixe, i have the same problem, but in this case i have the files in the template directory.
i am upgrading an old kirby 2 to kirby 3, i used the script to optimize the name of folders in /content, and everything was ok.
When i was starting to “re-organizing” blueprints, i made a new site.yml with this code:
sections:
#
pages:
headline: Pagine
type: pages
templates:
- home
- about
- works
#
pages__utility:
headline: Pagine di servizio
type: pages
template: error
i have already put error.php and home.php in /site/templates folder, but i cannot view the pages in panel…
If i try to create a page with the name of the template then the panel display this message [that means the pages already exist, but i cannot view them…]:
label: Pagine
icon: globe
sections:
#
pages:
headline: Pagine
type: pages
templates:
- home
- about
- contact
- spin-off
- works
- clients
- people
#
pages__utility:
headline: Pagine di servizio
type: pages
templates:
- search
- error
- default
- policy
/tabs/site_utility.yml
label: Utilità
icon: cog
sections:
#
data_utility:
headline: Utilità dati
type: fields
fields:
#
## Loghi
#
site__headline:
label: Site management
type: headline
#
logo:
label: Logo Header
type: files
max: 1
help: Carica qui il logo in formato .SVG
#
menu:
label: Seleziona le pagine da includere nella barra del menù (e nel footer)
type: pages
width: 1/2
#
social:
label: Indica qui i social
type: structure
width: 1/2
fields:
url:
label: Url
type: url
width: 1/2
logo:
label: Logo (formato .SVG)
type: files
max: 1
width: 1/2
Solved, was a multi-language problem, because the old site was with 2 languages active, and the new K3 site was with just one. Setting the right languages everything is ok.