Score:0

Author field in views-view-unformatted.html.twig

cn flag

I'd like to print single fields in views-view-unformatted.html.twig. I'm doing it this way:

{% for key,row in rows %}
  {{ view.style_plugin.getField(key, 'field_name') }}
{% endfor %}

But the author field isn't printing out. I tried

{{ view.style_plugin.getField(key, 'author') }}

and

{{ view.style_plugin.getField(key, 'uid_1') }}

which is the machine name in the view. But nothing works. In the view the field I set to print as rendered entity which works as expected in the preview.

How can I get the right field name for the author?

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.