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.
By Davidchristy on
Hello,
I'm trying to edit my theme to have a custom design for my view, and it will take having static html (<div>
, etc ) between some of the fields of one item in the view. NOT between the different items themselves,
I found the twig file I should be editing, "views-view-unformatted.html.twig" but I can only put one variable in for all the fields "{{ row.content }}" which isn't helpful to me.
Any help would be nice.
David Christy
Comments
Missing information due to html syntax.
The information about the html was interpreted. You might want to use < c o d e > tags so we can actually read what you are trying to say.
Thanks
I have updated the question now, thank you.
Doesn't sound like the right twig file.
See https://www.drupal.org/docs/8/theming/twig/twig-template-naming-conventions
Sounds like you need a specific field twig.
So, I could edit this twig
So, I could edit this twig file...
core/themes/stable/templates/views/views-view-fields.html.twig
But, I still would not be able to tell which field it's on and thus would not be able to put static HTML between the fields.
Again, doesn't sound like the right twig
Was referring to field twigs like \core\themes\stable\templates\field\field--node--created.html.twig.
You probably need one for your specific field. You might want to start debugging twig to find out the name for it.