Show author profile block in Drupal node

For our new themes, we want to display author profile at the end of the article (Drupal node). There's no module fit our requirements. After some research, we can build flexible author profile block with Views and EVA modules. Below is instruction how to do it in Drupal 7.

Modules in this tutorial

Add new field to user profile

First, you need to add some fields to user profile. To do this, click on Configuration and then Account settings. Then click Manage fields at the top right corner. Here you can add field like content type, you can make field display on user registration form. For example, I add About long text field:

Add new field to user profile

Now, go to People then click edit next to the user name you want to add about text. Scroll down to the bottom of the page and add some text

add some text

Create "About the author" block and add to node

Make sure that you enable Eva and Views modules (by clicking to Modules then scroll down to the bottom)

enable Eva and Views modules

Go to Structure » Views » Add new view and follow this instruction:

Add new user view

Next, you need to add new EVA Field and delete block display:

add new EVA Field and delete block display

Add "About" field

Add About field

Now, on Entity content settings, choose Entity type: Node and choose content type at Bundle line

At EVA Field: Arguments dialog, choose "Use tokens from the entity the view is attached to" and insert "[node:author:uid]" to Arguments input.

Arguments dialog

Next step, add Contextual filters: Click "Advanced" to drop advanced configure for views and add Contextual filters

add Contextual filters

Click apply to go to configure page:

Configure contextual filter

At configure page, click to choose "Provide default value", select "User ID from URL" from select list and check "Also look for a node and use the node author". Click Apply and you're almost done.

Go to Structure » Content type and click Manage display next to the Content type that you want to show author information

Re order display

That's it! You can add some field to your views and decoration it with CSS like our demo.

Related post

Have More Idea?

We are here to build your website!

No Universal solution fits all special business requirements. Our experienced team is ready with ideas and state-of-the-art technical solutions to consult the best solution within your budget.