How to create a 'about the author' contect block/view?

Events happening in the community are now at Drupal community events on www.drupal.org.
Posted by dakke on February 26, 2011 at 2:07pm

Hi all,

I tried to create a 'about the author' block/view, which should be displayed on the article detail node. Currently, by default the 'about the author' is shown at the bottom (hardcoded in the OP node views).

I managed to use the advice found here, to create a 'more by this author' block. Yet using this method (using views arguments extra), I get the author of the actual content and not the one indicated as 'author'. In other words, when creating an article, I create the article and indicate that X is the author of the content.

I would like to show a view/block in contexts showing info about the author.

Anyone any idea?

Comments

Found the solution myself

Posted by dakke on March 2, 2011 at 4:33pm

Found the solution myself (probably rather easy for those with a better understanding of Drupal):

Trick is to use (in your view) an argument and a relation and add some fields obviously.

1 relation: use field_op_author
2. argument:
Node: ID
relationship: Do not use a relationship
Provide default argument: Node ID from URL

Add the fields you need:
Author(s) Content: Photo (rel author)
Content: Author Title (do not use relationship)
Author(s) Node: Teaser (rel author)

"About the author" in drupal 6 with Views

Posted by zindie on March 11, 2011 at 9:49pm

I'm developing a "drupal 6 based" site (not OP) where every authenticated user can post a story. Can someone tell me how automatically attach a 'about the author' box below a story? I suppose it needs views and, maybe, panels too. Please, help!
Thank you!

Drupal 6 solution

Posted by alexmcl on July 4, 2012 at 8:26pm

The following worked for me in Drupal 6:

1 Create a view of type Node and add a block display

2 Add an argument User: Uid with:
Action to take if argument is not present = Provide default argument
Select User ID from URL
AND Select Also look for a node and use the node author

3 Add fields as desired. I chose:
User: Picture
User: Name
Profile: Personal information: Short bio // This is a field I added
Profile: Personal information: First name // Also added this
Rewrite the output of this field = [value_1]'s profile and latest posts

Hope this helps someone in the future, suspect too late for zindie

worked for me, thanks.

Posted by joserey on September 8, 2012 at 3:22pm

Thanks for showing the way. With a little more tweak here and there, this views solution got me what I wanted. In fact creating more custom profile fields and then getting them into the block was neat!

How to do it in Drupal 7

Posted by pha3z on May 10, 2012 at 11:59pm

dakke's solution looks good to me, but I had to adapt it for Drupal 7 since terminology and UI has changed a little bit. Here's how I did it:

1 - Create a new Block View to view Users (not Content)

2 - Filter Criteria should say User: Active (Yes)

3 - There is a default sort Criteria item. Remove it since it doesn't matter.

4 - Add a Relationship: Choose "User: Content authored"

5 - Add a Contextual Filter: Chose "Content: Nid"

6 - In the configuration options for the newly added Content: Nid, choose these options:
WHEN THE FILTER VALUE IS NOT AVAILABLE:
Provide default value
In the Select box, choose Content ID From URL.

WHEN THE FILTER VALUE IS AVAILABLE OR A DEFAULT IS PROVIDED
Specify validation criteria
Validator select box: Content
Content Types: choose the content types you want the view to work with.
Filter Value Format: Node ID
Action to take if the filter value does not validate: Hide View

7 - Save the View.

8 - Go to Structure -> Blocks and configure the block to show on the types of content you want it to show on and position it wherever you want it to appear.

9 - Done.

omg, you just saved me so

Posted by ivars211 on May 30, 2012 at 8:14pm

omg, you just saved me so much time. Thank you. It worked perfectly.

It pays to share knowledge.

Posted by pha3z on May 30, 2012 at 11:09pm

I'm glad I posted clarification on how to do this after I finally figured it out. I nearly pulled my hair out finding the needed information. I figured someone sooner or later would find this thread and benefit. :)

Thank you!

Posted by friendlymachine on August 23, 2012 at 2:51am

Much appreciate your guidance on this one!

John Hannah
Friendly Machine

You rock pha3z!

Posted by allenshorter on October 10, 2012 at 11:56am

You just saved me an hour of fiddling around. THANK YOU!

Also, check out this link to build a block of node author's content. Makes a really nice complement to this block if you are doing a blog or something.

http://views-help.doc.logrus.com/help/views/example-author-block

It is written for the old views, but basically

  1. just create a new view show content of type blog (or whatever).
  2. relationships, add content: author
  3. under contextual filters follow along with the "adding context with arguments section of the link above
  4. put in a user ID (not node ID) in the contextual filters to test

Thank you soooo much!

Posted by egomozova on June 6, 2014 at 4:01pm

Thank you soooo much!

Thank you so much !

Posted by stouring on July 8, 2015 at 1:21pm

Very helpful comment, thank you so much !!

This worked perfectly

Posted by spanners on March 20, 2016 at 7:47pm

This solution works. Thank you.

--
Simon Olsen
Web design, graphic design, motion graphics
Find me on LinkedIn: https://au.linkedin.com/pub/simon-olsen/12/359/143

Tanks

Posted by coozila on April 13, 2016 at 9:50pm

Only 3 Steps...

Posted by rakesh.gectcr on October 30, 2012 at 6:52am

1)Go to admin/structure/views/settings and activate "Always show advanced display settings"

2) Create relation ship in your view with " Content: Author "

3) Get a Field in the Fields with " User:Name" with relation as author.

Check this link also:-http://drupal.org/node/1200180

Rakesh James

OpenPublish

Group organizers

Group categories

Group notifications

This group offers an RSS feed. Or subscribe to these personalized, sitewide feeds:

AltStyle によって変換されたページ (->オリジナル) /