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.

Archive

Access author YAML field?

Started by Muut Archive 12 years ago · 5 replies · 310 views
12 years ago

How do I access the author YAML field? I tried "page.author" and it doesn't work.

12 years ago

I'm talking in the context of making a blog theme... Loosely following the Blog skeleton...

12 years ago

if you have author set in the page headers, and you are trying to access from a Twig template, it would be:

TWIG
{{ page.header.author }}

There is an example of this in the Theme Variable Docs.

12 years ago

Ah, ok! Can I create another field there? Like "description"?

12 years ago

You can create any field you like in the page headers, yes.

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 1282 9 years ago
Archive · by Muut Archive, 9 years ago
2 889 9 years ago
Archive · by Muut Archive, 9 years ago
2 4019 9 years ago
Archive · by Muut Archive, 9 years ago
1 2894 9 years ago
Archive · by Muut Archive, 9 years ago
3 1078 9 years ago