Integrating the Author component

  1. Open user--author.html.twig in your editor and as we've done with all template suggestions, delete all the code except the comments

  2. Add the following code and save the file

{% include "@training_theme/author/author.twig" with
  {
    "attributes": attributes,
    "author": {
      "photo": content.user_picture,
      "name": content.field_full_name,
      "title": content.field_title
    }
  }
%}
  • Reload Drupal's homepage and you should now see the author information properly themed.

Last updated