Skip to content
● Meet Grav Guard: keep every Grav site you run secure and up to date, all from one place. Free for up to 3 sites. Read more →

Multiple authors

Started by Muut Archive 11 years ago · 2 replies · 552 views
11 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?

11 years ago

I had to deal with a similar situation and

11 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 Muut Archive, 10 years ago
1 640 7 days ago
Archive · by Deleted User, 9 years ago
0 3015 9 years ago
Archive · by Muut Archive, 9 years ago
2 1964 9 years ago
Archive · by Muut Archive, 9 years ago
2 5309 9 years ago
Archive · by Muut Archive, 9 years ago
1 4115 9 years ago