I’m on a new project and I have to make two big different categories of projects, and they are communicating. The “project one” got different project pages that are the reference of a “project two” page, and conversely a “project two” page got multiple “project one” pages in reference.
Then I don’t know what is the best way to make a clear panel for the “non-coder users” that will use it… I was thinking about a system like multiple writers on a blog, and change writers by “projet two” pages, but I don’t know.
Note that relationships in Kirby can be fragile if you are not careful. For example, when you reference page A in page B by storing its UID and the UID is later changed by the user, the reference will no longer point anywhere. It is therefore advisable to use the AutoID plugin on top of the relationship plugin.
Also, if a referenced page is deleted, the reference to that page will not be deleted.
Options can be dynamic, it depends on your use case how to best solve that. For example, if you tell the plugin to fetch all children of a given page, of course the options will reflect this when more children are added etc. You can also define a field where a user adds new options and the options in. the page are then fetched from that field.
This will not return. a page. Is that a field in site.txt? Or are. you looking for the. page called projects?
And a general recommendation: Never ever call an. object method (like children() in this example) without prior checking if you got a corresponding object, in this case a page. object.
Well, I find it ! Thank you so much.
Now I was thinking about something… These relationship are just one way relation, I choose for an element the linked element to it, but when I choose them, they are not linked in the invert way by a “friendship system”… one way love
It’s ok, it show the link array number (0, 1, 5, 6 Etc.) but when I try to write things like <li><?= $link->title() ?></li> or <li><?= $link->year() ?></li> it doesn’t work.
What does your blueprint look like, what is stored in your content file? You probably get an empty collection if you store the UID instead of the URI. You can check such stuff if you