Blueprint checkbox and query


From the kit, I add this in album.yml, itโ€™s work :heart_eyes:

    type: checkboxes
      ๐Ÿ : 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
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 }} "
    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


Thank you for the plugin trick and more !