Hi,
From the kit, I add this in album.yml, itโs work
home:
type: checkboxes
options:
๐ : sur la home
For my home template
<?php foreach ($imagesPage->children()->filterBy('home','๐ ')->listed() as $album): ?>
is good
Now, I would like to filter like that :
type: pages
headline: Projets
parent: kirby.page("images")
size: medium
query: page.filterBy("home", "๐ ")
info: "{{ page.home }} "
But itโs not OK. Any idea ? Is it possible ?
May I ask why you want to store an emoji in your content file?
Itโs look clear and usefull with a single line :
info: "{{ page.tags }} {{ page.home }} | {{ page.images.count }} image(s)"
Are you using the pages display plugin? Because you cannot filter a standard Kirby pages section using a query?
1 Like
Not yet.
Now I use it, but itโs not work for me.
This will work:
type: pagesdisplay
headline: Projets
size: medium # only makes sense with layout: cards
query: site.find("parentpage").children.filterBy("home", "๐ ")
info: "{{ page.home }} "
photography:
headline: Projets
type: pagesdisplay
query: pages.index.filterBy("home", "==", "๐ ")
extends: sections/albums-home
status: listed
I found this, I will try your version.
In general, itโs never a good idea to use the index if you can avoid it.
1 Like
So stupid, I try with
site.find("parentpage")
Thank you for the plugin trick and more !