Score:0

target separate fields of my taxonomy term in my view using twig

lk flag

I have a view displaying taxonomy terms as fields by making use of a responsive grid. I have a twig file based on views-view-grid-responsive.html.twig.

in this twig file there is a loop {% for item in items %} and than in there {{- item.content -}} which is basically displaying the whole taxonomy term. in my case simply the name and an image.

I am trying to find a way to target each field/value separately

It was suggested that: {{ item.content['#node'].field_name.value }} would do that, but it doesn't show any content at all.
I also tried {{ item.content['#taxonomy_term'].field_name.value }} but also no results so far

hope anyone can help

thanx in advance!

I sit in a Tesla and translated this thread with Ai:

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.