5

I'm sure this is VERY basic, but after 1/2 day or searching, I am finally posting for help.

I have a simple view that is displaying a list of node titles & other fields (view count, comment count, etc). I can't find how to add the name of the author who wrote the corresponding node to a field.

For example- the final result SHOULD look like this-

Title by: Author Name Views: # Comments: #

I have everything else working- just can't figure out how to add the author name field. What's the secret? Thanks guys!

2
  • Trying to do something similar, but in creating a dynamic view. I want user tweets block (using Twitter module) to automatically show on the nodes authored by them. Since I don't know this value, cannot use a filter. ...I am using relationship "Content:Author" and have tried using contextual filter "User:Name" with "provide default" of "Content ID from URL". It is still displaying tweets from all users.
    – Greta
    Sep 20, 2012 at 19:51
  • @Greta I think this will solve your problem :- [My solution on Calling block on specific user login][1] [1]: drupal.stackexchange.com/questions/71684/…
    – Saurav
    May 7, 2013 at 6:52

1 Answer 1

8

You need to add a connection between users and content. This is done through relationships. Go to relationships and select Content: Author. Then if you add fields you will see several new fields to choose from including User: Name. When configuring User: Name there will be a drop down that lets you choose which relationship since there is only one choose that one.

3
  • Awesome. This worked. FYI- in case anyone else needs this, that syntax is actually Content: Author in the relationships portion, and User: Name in the field list in D7.2 Thanks for the help!
    – user800507
    Jun 26, 2011 at 4:05
  • ADAM S - U R A GOD!!!!!!!!!!!! I spent ages trying to do this, I had no idea about having to use "relationships" you have made my day! THANK YOU!!!!!
    – user1765
    Jun 27, 2011 at 9:30
  • Trying to do something similar, but in creating a dynamic view. I want user tweets block (using Twitter module) to automatically show on the nodes authored by them. (Similar to what Author Pane module does.) Since I don't know this value, cannot use a filter. ...I am using relationship "Content:Author" and have tried using contextual filter "User:Name" with "provide default" of "Content ID from URL", among other options. It is still displaying tweets from all users. ...Is this posts solution applicable, but I am missing something?
    – Greta
    Sep 20, 2012 at 19:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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