I’m pretty new to Kirby and ran into my first problem I can’t figure out a solution.
I’ll have two collections. One manages Companies, the other one the Sectors.
So I’ve managed a select field in the company blueprint, that queries the sectors. Every Company can be part of only one sector, so this works fine.
But I want to show in the sector (backend blueprint) all companies that are attached to a sector. And I don’t really know how I’m going to query this. In the sector panel there should be a related pages section that displays all companies that were attached to this sector by the selection of the select field in the company blueprint.
I’ll hope that’s kinda understandable.
I know that I should query the attached UIDs. But I don’t know where and how to start.
In the sector panel there should be a related pages section that displays all companies that were attached to this sector by the selection of the select field in the company blueprint.
You want this as a read-only section?
To use as a reference?
Just as a set of related pages. The edit option would be ok but not necessary.
In the Frontend the companies of a sector should also be avaiable to be listed on the sector detail page.
In the Frontend the companies of a sector should also be avaiable to be listed on the sector detail page.
I’m confused now. Do you want the companies to be displayed on the frontend or in the backend?
You’re currently assigning a sector to a company. If what you want is to then, in the frontend page for the sector, display a list of companies in that sector, then it’s a matter of filtering your companies using the current page as the reference value.
Well, both. I want to show the sector on the company page in the Frontend and the Companies assigned to the sector on the sector page in the Frontend.
But my first concern is the automatic assignment of the companies to the sector panel page for all companies that are assigned to a sector on the company panel.