Skip to content
● Grav 2.2 is out: 2x faster cold starts and 96% less memory on big sites. Read the announcement →

Access author YAML field?

Started by Muut Archive 12 years ago · 5 replies · 471 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 2604 9 years ago
Archive · by Muut Archive, 9 years ago
2 1711 9 years ago
Archive · by Muut Archive, 9 years ago
2 5008 9 years ago
Archive · by Muut Archive, 9 years ago
1 3836 9 years ago
Archive · by Muut Archive, 9 years ago
3 1818 9 years ago