Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I have a custom template for a sub-theme. Inside my templates folder I copied the node.html.twig file from zurb theme to my subtheme.
When trying to print {{ author_picture }} I get nothing at all. To trouble shoot I added the file to core bartik and it printed the compact view of the user profile.
If I wanted to print some fields from the author. How would I gain access to the variables on the author's user profile in twig?
Comments
Comment #2
samuel.mortensonnode--html.twig isn't a valid template name - Could you try changing that filename to node.html.twig, rebuilding caches, then debugging author_picture again?
Comment #3
samuel.mortensonAlso, you should be using 8.x-5.x-dev or 8.x-6.x-dev. Could you change the version field in this issue's metadata?
Comment #4
kclarkson CreditAttribution: kclarkson commentedSorry about the typos :)
I am using Beta2 and had the correct template file name. node.html.twig
Comment #6
samuel.mortensonIf you pull in the latest Zurb Foundation 8.x-5.x-dev and rebuild caches, this should be fixed! Thanks for the bug report.