Both-way define corresponding pages inside the panel

In my Kirby site, I have pages for “events” as well as “event-locations”. From within the panel, I would like to go to an “event” page and select the corresponding location from a dropdown, so that I can link it on the “event”-site – which should be easily done with a select field.

But when I’m on the site for the “event-location”, I would like to show all events that are linking to that specific location without having to specify the connection again in the “event-location” panel.

Is this somehow possible? Thanks in advance!

That’s no problem, create a select field and query the location pages as options (see the docs for the select field). You can then fetch the information from the location page in your template.

Do you need this in the Panel or on the frontend?

I would need this in the frontend, although it would be a nice touch if it would also show in the panel. (By the way, am I the only one currently having issues with images not being displayed in the forum?)

You can filter events by location to display all events that belong to a specific location.

Dynamic options select field:

For the Panel, you would need a custom section plugin that allows queries, but that should be possible as well (although I haven’t tested filtering by current page yet).

1 Like