Hello,

I'd like to create a block that display informations on the author of the article. These informations are saved in different fields that I've created in the Users part of Drupal.

I guess I have to create a View and use contextual filters to get these fields, but I don't know how to do...

Thanks for your help !

PS : I use Drupal 8.x

EDIT : Finally found the solution

  1. In Configuration / Users / Account settings / Manage fields, create a text field (call it author_information for instance) where you will store informations about the authors.
  2. In Structure / Content types / Your content type / Manage fields, create a User field (call it Authors for instance).
  3. In Structure / Viewmodes, create a new display viewmode in the Users section. Select fields that you want to display in this viewmode (author_information in particular...). This will be the fields that you will display in your views.
  4. In Structure / Views, create a new View:
  • In fields, select the field Authors you've created in step 2.
  • Click on the link and in display tool, select Rendred entity
  • In viewmode, select the one you created in step 3

Comments

Jaypan’s picture

The Author Pane module can do this, however it still does not have a D8 version. You can watch to see when the D8 version is released.

Falcox’s picture

Thx for your help. I hope this module will soon have a D8 version.
Meanwhile, I wish that someone will have a solution for me, using Views. :)

VM’s picture

I don't see an immediate solution using views. You may be able to get parts of it working. May make sense to write your own block module.

Falcox’s picture

OK, thanks for the advice.