Doesn’t “page” refer to the page where I currently am? I want to find a page with the name “sponsors” and get its children. When I used page I didn’t get the right ones but the children of my current page.
This might be what I need. Never saw this in the kirby docs. But of course I don’t know them in and out like you do . Most of the time you got the feeling that the solution might already exist but you can’t find it by searching and then you try to build it because the client pays your hours and you need to make progress (and can’t search forever ^^).
Here is what I need to build, or at least I am trying ^^.
I want to create a page “sponsors” that has sub-pages. Every sub-page has “n” sponsors which are structured fields with an image, some description and a link.
Now I want my client to be able to fill in which sponsors he has (into the appropriate category) and then select one of those sponsors on different sub-pages. On those sub-pages the sponsors will be shown somewhere.
So he has to define the different categories once and he then knows that if he changes them in one place, all sponsors are correct in any other place where they appear.
To do this I thought I will build a select field where I fetch all sponsor children, let the client chose which sponsor block he wants and display the correct one. I want to be able to add a field on any page or sub-page to chose sponsors.
So this page “sponsoren” is kind of like a database. It is invisible and should just store data in one place to be accessible on other sub-pages so you don’t have to repeat the same data over and over again.
Inside of “sponsoren” you got sponsor categories that you can create and then add different sponsors to them.I used structured fields for that so you can add as many or as little sponsors that you got.
Inside of each sponsor (e.g. main sponsors) you got something like this. A site with a structured field which defines what data should be stored. You can add, delete and update sponsors like you want.
Now I want to access the categories of sponsors on ANY given page. For example I could be on a projects page and there I want to chose what kind of sponsors did support this event (main sponsors or sub sponsors, etc) so here I want to chose the category and then in the template I fetch from that defined category all the related sponsors. And this is where I am now and trying to build that Select Field.
You could also imagine this a bit like a tagging system but I want to limit the tags to the categories that exist and then I want to chose from them on every page individually.
Tricky to describe but I think this should give you some insights into the project ^^.
Ok, thanks for clarifying, but then the blueprint query I posted above should work as expected, because all you want to select is one of the children of sponsors.
Yes I just tried it out and it works perfectly. You’re the best
Thank you so much for that solution. Sometimes you can’t see the forest cause of all those trees. Didn’t knew that select fields where that powerful. I never thought that they can do that by default