0
votes

I'm making a blogging site with 5 users that have the 'Blogger' role. This role is simply for writing articles on the site. I'm looking to make a view that displays each of the 5 bloggers' avatar image and underneath each blogger avatar image, the 3 most recent articles they've posted.

Right now I have a view set up that displays all bloggers and I've set up a relationship to content authored by the user. The issue is that if one blogger has multiple articles published, it will display the blogger's avatar once per article. For example:

blogger1 Title: Mumbles Just Doing The Damn Thing Per Usual…..

blogger1 Title: The Only Reason You'll Need To Root For The Heat Tonight

blogger2 Title: Wheel of Fortune Fail For the Ages

In the above example, Blogger1 has two articles but his avatar/name is displayed once for each article. How can I fix this? Thanks

EDIT* * * * * * * * * * * * * * * * * * * * * * * *

I used the Field Grouping option to group by User:Name so it works as I desired:

Blogger1

article 1 by blogger1 article 2 by blogger1

Blogger2

article1 by blogger2

etc.

My only question is, how can I change the grouping field style so that next to 'Blogger1' there is an image of their avatar? Also the default display is a tag, is there any way to change this?

Thanks

1

1 Answers

0
votes

On the format settings (where you're setting your field grouping), there should be an option that says "Use rendered output to group rows". If that is enabled, you can rewrite the results of the User Name (Author) field to include a User Picture.

Add a new User Picture field to the View. Exclude it from display and re-arrange the fields so that the User Picture is above the User Name field. Now you can rewrite the results output of the User Name field to something like [picture] [name] (the available patterns are available in a collapsed field under the "Output this field as a link" option). You can mix HTML in with the replacement patterns to achieve the desired markup.