Skip to content
Grav 2.0 is officially stable. Read the announcement →
Support

Set page content in blueprint

admin

Started by Thibault OLLIVIER 8 years ago · 2 replies · 622 views
8 years ago

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 :

YAML
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 !

👍 1
8 years ago

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!

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

👍 1
last edited 12/29/18 by Anders

Suggested topics

Topic Participants Replies Views Activity
Support · by Anna, 1 day ago
2 77 5 hours ago
Support · by gtx, 1 week ago
4 234 2 days ago
Support · by Paul Hodges, 2 weeks ago
13 283 5 days ago
Support · by Anna, 3 weeks ago
9 340 1 week ago
Support · by TomW, 2 weeks ago
4 192 2 weeks ago