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

kclarkson created an issue. See original summary.

samuel.mortenson’s picture

node--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?

samuel.mortenson’s picture

Also, 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?

kclarkson’s picture

Title: author_picture Variable not printing in node--html.twig » author_picture Variable not printing in node.html.twig
Version: 8.x-1.x-dev » 8.x-5.0-beta2
Issue summary: View changes

Sorry about the typos :)

I am using Beta2 and had the correct template file name. node.html.twig

samuel.mortenson’s picture

Status: Active » Fixed

If you pull in the latest Zurb Foundation 8.x-5.x-dev and rebuild caches, this should be fixed! Thanks for the bug report.

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.