0

I have created a view to show a nodes comments in a block.

Authors on my site have different roles, and they can create a single business page. On that page, other users can leave comments.

For site authors that have a "Free Listing" role, I want to hide the ability for other users to post comments.

To do this, I have added a view to display comments, then added a relationship for Comment:Content, then a relationship for Content:Author.

In my previous experience, this should give me a field (Content)Author:Role to filter results by. Instead, I get no additional fields, just the standard Content:Author ID field, which then tells me..."If you need more fields than the uid add the content: author relationship", I have!!!

Have I uncovered a bug? Or am I missing something?

enter image description here

enter image description here

Any advice appreciated.

1

You need to filter for a User fields if I understand correctly (i.e. you want to display only comments on the current node when the node author has a certain role).

Select User: Roles as the filter and make sure the Relationship select box is set to the identifier for Content: Author. That will let you filter the comments by the node author's role.

  • Ah! I am a moron! That was staring me right in the face, but I just assumed it was for the role of the comment author. Thanks! – Collins Oct 31 '15 at 11:09

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.