Skip to content

Instantly share code, notes, and snippets.

@Alexander-Pop
Created January 13, 2021 01:52
Show Gist options
  • Save Alexander-Pop/daa7f02ef65bb37e205b1a3d5b4b7109 to your computer and use it in GitHub Desktop.
Save Alexander-Pop/daa7f02ef65bb37e205b1a3d5b4b7109 to your computer and use it in GitHub Desktop.
Drupal 8 - Show Author's Info in a Block #drupal #block #author
Creating Views: Author info
1. Go to Structure>Views.
2. Add new view: Author Info. Select Users in views setting. Select Create a block in Block setting. Set Unformatted list of Filed under Block display settings. Select 1 under items per block. Click->Save and edit.
3. Views setting page:
4. Now add Relationship: Go under Advanced setting. under relationship click add and from the list select Content Author, give it a name Author node (optional)
5. Now add contextual filter: Same as above step, click add to contextual filter. select ID. And select Provide default value. Under that select Content ID from Url.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment