Blueprint query

Hi there,

Every event has a field “registrations” (type: users).
These users have accounts in the panel (with blueprint “user.yml”).
Everyone that signs up to that event, gets added to that “registrations” field.

Is there a way to show the user’s events on it’s page in the panel?
In case of “Jose”, the event “Plog de Gent Trailrun” should show up in the “events” field…

See screenshots:

For your example you are using a pages field, but that is a select field and doesn’t magically list all available pages.

A standard Kirby pages section, on the other hand, cannot be filtered.

But @rasteiner’s Pagesdisplaysection plugin to the rescue:


Maybe a bit of a workaround, but could I use a select field instead with an advanced query? To see all the events that specific user goes to, will be listed in that select.

The select field works in the same way as the pages field: you have to explicitly select something, which is not what you are after, I assume, since you want to display the pages assigned to a given user.

1 Like

True, thanks for your quick help!
Maybe this is something interesting to add to Kirby?

Some “read only” fields where you can show relations…

I think a section is the better fit for this purpose and the pagesdisplay section is exactly what you need. But yes, if it was built-in, that would even be better:

Im trying to make it work but I get this error. Any idea what’s wrong?

Looks like you also have to set the parent prop, don’t know if this is because we are not in the site/page context here:

        headline: Some headline
        type: pagesdisplay
        query:'template', 'note')
1 Like

Thank you, it works now! Brilliant :slight_smile:

Almost there, this is my query:
query: site.find(“challenges”).children.published.filterBy(‘registrations’, ‘*=’, ‘U44BRSiT’)

Instead of hardcoded user ID “U44BRSiT”, how do I make the user ID (the current user page I’m on) dynamic?

Doesn’t work?

1 Like did the trick