1

Is it possible to display content by a group of authors without using a group module? I like the group module, but it's much more complex and robust than what I need it for.

Synopsis: We need to build a page that will display blog posts by not one specific author but by a group of authors dynamically and preferably contextually. The authors will not have control over this page or interact with it in any way. There will be dozens of these groupings of authors. The page will also display a view block of biographies for the authors that can be linked to the author's Drupal profile.

Edit: screenshot of my contextual filter using the selected answer below; pastebin of exported view enter image description here

2

The simple solution would be to add Term Reference field to the user's profile fields. Then for each user assigned them a taxonomy (in this case the taxonomy term name would be the group name).

Use Field Permissions module to control who can edit and change the user's tax reference field.

Use Views and filter by taxonomy term to display the "group's" content. You will need to make a View of Users then under Advanced (far right) add a Relationship of Content authored.

  • This seems perfect but I can't get it to work. – Christia Jul 13 '17 at 9:32
  • @Christia possibly cannot get it to work because of the "tax" field in this answer. Maybe because "onomy" should be added to it? BTW, I think the "more complex and robust" in the question should be replaced by "too sophisticated" (don't worry, I rarely downvote) ... Also, I'm tempted to post an extra answer to illustrate what you're missing by not simply using the Group for this (sales starts when the prospect says "no", right)? – Pierre.Vriens Jul 13 '17 at 12:35
  • I'm not opposed to using Group. I'm building a large and fairly complex website so I want to keep it as minimalist on the back end as possible. Using Group just for the purpose of displaying content feels like overkills so I am checking for other options. :) – Christia Jul 13 '17 at 14:14
  • @Christia where are you stuck? – No Sssweat Jul 13 '17 at 22:34
  • 1
    It seems to be working now! I don't know why it wasn't before. Maybe a caching issue. Thanks for your help! – Christia Jul 14 '17 at 2:49
1

You can also create a new user role and assign it to these specific authors then in your view:

  1. Add relation to author.

  2. Filter results where the user has this new role.

  • This is valid, depends if you want to deal with permissions. Might be ideal for certain situations and not ideal for others. – No Sssweat Jul 13 '17 at 8:25
  • 1
    I have several dozen groups of users and would like to keep my list of role types simple, otherwise, I considered this also. Thank you! – Christia Jul 13 '17 at 8:51
  • @Christia Just in case you don't realize: have a look at this answer, it explains how via the Group module you can create your own Group specific roles (cfr the dozens of groups you mentioned), which are different (repeat different) from the typical roles that come with Drupal core. so with that, you get the best of both worlds: (a) keep your list of (core) role types simple and (b) implement your dozens of groups of users with something that compares to those roles ... – Pierre.Vriens Jul 13 '17 at 12:43
  • I don't need any special or different roles though. I just want to display blogs. – Christia Jul 14 '17 at 0:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.