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

Multiple authors

Started by Muut Archive 10 years ago · 2 replies · 491 views
10 years ago

I'm creating a blog with multiple authors. I'm trying to find a way to have automatic author information (name, picture, bio) at the bottom of every post. What's the best way to do this?

10 years ago

I had to deal with a similar situation and

10 years ago

I had to deal with a similar situation and found a trick that works, but there might be a more practical solutions.
Given that you created a parent page named author with children pages and also given that you created a custom fields in the blog article blueprint with "header.myauthor", this code might work:

TWIG
{% for page in page.find('/author') if page.header.myauthor == page.author %}
{{ page.header.authorbio }}

{% endfor %}

Suggested topics

Topic Participants Replies Views Activity
Archive · by Deleted User, 9 years ago
0 2291 9 years ago
Archive · by Muut Archive, 9 years ago
2 1506 9 years ago
Archive · by Muut Archive, 9 years ago
2 4758 9 years ago
Archive · by Muut Archive, 9 years ago
1 3572 9 years ago
Archive · by Muut Archive, 9 years ago
3 1631 9 years ago