Skip to content
Grav 2.1 is out: every page speaks Markdown. Read the announcement →

Set page content in blueprint

admin

Started by Thibault OLLIVIER 8 years ago · 2 replies · 676 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 complanar, 6 days ago
6 147 20 hours ago
Support · by Rick Beebe, 6 days ago
2 103 3 days ago
Support · by blu3prince, 3 days ago
0 55 3 days ago
Support · by alex, 4 days ago
2 96 3 days ago
Support · by Marcel, 2 weeks ago
1 146 4 days ago