Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Set page content in blueprint

admin

Started by Thibault OLLIVIER 8 years ago · 2 replies · 821 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 TomW, 2 weeks ago
8 227 9 hours ago
Support · by alex, 2 months ago
8 667 23 hours ago
Support · by Supple, 5 days ago
1 98 1 day ago
Support · by TomW, 1 week ago
3 159 3 days ago
Support · by TomW, 6 days ago
2 106 5 days ago