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

Multiple authors

Started by Muut Archive 10 years ago · 2 replies · 427 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 1362 9 years ago
Archive · by Muut Archive, 9 years ago
2 940 9 years ago
Archive · by Muut Archive, 9 years ago
2 4069 9 years ago
Archive · by Muut Archive, 9 years ago
1 2959 9 years ago
Archive · by Muut Archive, 9 years ago
3 1124 9 years ago