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
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
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
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.
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
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
omg, you just saved me so much time. Thank you. It worked perfectly.
It pays to share knowledge.
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. :)
Designer and Programmer for Hire
http://fuzzpopstudio.com
Thank you!
Much appreciate your guidance on this one!
John Hannah
Friendly Machine
You rock pha3z!
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
Thank you soooo much!
Thank you soooo much!
Thank you so much !
Very helpful comment, thank you so much !!
This worked perfectly
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
Tanks
Only 3 Steps...
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