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

Community guidelines

Please keep discussions civil and on-topic. Repeated violations may lead to a temporary ban.

Support

Set page content in blueprint

admin

Started by Thibault OLLIVIER 7 years ago · 2 replies · 549 views
7 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
7 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 Thomas, 1 week ago
2 64 17 hours ago
Support · by Anna, 3 days ago
2 68 20 hours ago
Support · by Justin Young, 21 hours ago
1 35 21 hours ago
Support · by Duc , 1 week ago
2 71 6 days ago
Support · by Colin Hume, 1 week ago
2 63 6 days ago