Hello there!
I’m currently working on the backend of a project but I am unfortunately getting stuck. Basically, here is how the arborescence of the pages looks like:
- Main collaboration page (parent-template)
- Collaborator (collaborator-template)
- Projects from the collaborator (project-template)
- …
- Collaborator (collaborator-template)
- Projects from the collaborator (project-template)
- …
Because all the individual projects will be listed in the Main collaboration page, I want to default de value of a pages field in the project-template to its parent page (the collaborator) for better ease of use.
The task seems very simple and I know that the default field should output parent: - page//(page UUID)
, but I cannot find any documentation on how to set up the default value in the project-template blueprint. Here are all uneducated guess I’ve tried so far:
parent_field:
type: pages
default: " {{ page.parent }} "
default: " {{ page.parent.uuid }} "
default: " {{ page(page.parent.uuid) }} "
default: " - page//{{ page.parent.uuid) }} "
default: page.parent
default: page.parent.uuid
default: page(page.parent.uuid)
default: |
" {{ page.parent }} "
default: |
" {{ page.parent.uuid }} "
default: |
" {{ page(page.parent.uuid) }} "
default: |
" - page//{{ page.parent.uuid) }} "
default: |
page.parent
default: |
page.parent.uuid
default: |
page(page.parent.uuid)
As you can tell from my progressively random guesses, I’m lost. Is this even doable in Kirby?
Thank you in advance for you help <3