Set page content in blueprint

admin

#1

Hey, I tried to search for a similar issue but didn’t find it so here we go :

I’m trying to set a website for a small journal, basically I have two main page type : Issue and Article. I would like my Issue page to always list the article it contains. My question is : is there a way to set the content of a page inside its blueprint or do I have to always set it inside its own .yaml definitions foreach issue ?
By content I mean this, which will exists in every Issue I will create :

content:
    items: '@self.children'

I’m asking because at some point the website won’t be only managed by me but also non-developer who should be able to create issue without tinkering with yaml.

Hope I’m clear enough, I’m a beginner and english is not my native language.

Thanks !


#2

Isn’t this what is happening in the part of code at line 33 in …/user/themes/quark/blueprints/blog.yaml when using Grav and Quark-theme ?

Check that out!

            header.content.items:
              type: textarea
              yaml: true
              label: Items
              default: '@self.children'
              validate:
                type: yaml

#3

Perfect ! Thank you very much !