1

I am trying to make a Drupal View which only shows the comments of users with a certain role. For example I have a node with content_author who has Role Y. The same user (with Role Y) placed a comment, another user with Role X posted a comment too.

I want to have a view which only displays comments from users with Role X. This does not depend on the user who is logged in, so I cannot use a contextual filter I suppose.

Did anyone manage to do something like this?

0

1 Answer 1

0

I figured out how to do it.

  1. Create a view displaying items of type Node.
  2. Create a relationship Comment:User
  3. Create a filter User: Roles and require Relationship with User (which was created in 2.
  4. Specify the roles

You can style the view (and add fields) as you like.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.