Score:0

Twig template for specific node view

il flag

I have a views-view--resources-filter.html.twig file. Within here I have a better exposed filters form and I loop through the resources (node) with the available {{ rows }} variable. My question is, what is the naming convention to make a node view for an unformatted list where I use fields to show? So basically that it only styles the nodes within this view. I've been looking for a solution all day, but couldn't find anything really related to my issue.

Score:0
cn flag

It will be something like

views-view-unformatted--my-view-name--my-display-name.html

For more info, turn on twig debugging and look in the Views module template folder at /core/modules/views/templates/.

Jorn Reed avatar
il flag
Thanks! It works for me with this now: `views-view-unformatted--resources-filter.html`, I know that the name I used is the view name/machine name. But what is the best way to find the display name?
cn flag
The display name of the view is shown in the Views UI for each display under the Advanced toggle. @JornReed
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.