Below is a twig template: core/modules/views/templates/views-view-unformatted.html.twig:
{#
/**
* @file
* Default theme implementation to display a view of unformatted rows.
*
* Available variables:
* - title: The title of this group of rows. May be empty.
* - rows: A list of the view's row items.
* - attributes: The row's HTML attributes.
* - content: The row's content.
*
* @see template_preprocess_views_view_unformatted()
*
* @ingroup themeable
*/
#}
{% if title %}
<h3>{{ title }}</h3>
{% endif %}
{% for row in rows %}
<div{{ row.attributes }}>
{{ row.content }}
</div>
{% endfor %}
How do I alter the markup (and add some php logic) in row.content
? - which outputs markup such as:
<div class="views-field views-field-body">
<div class="field-content">
<p>Hello world!</p>
</div>
</div>
Presumably, there is another twig template for this markup? I cannot find it. I have the twig debugger turned on, but there are no notes above the markup that renders each content field.
I've looked at the template preprocess functions in views.theme.inc too - can't see any markup being generated in those things.
Thanks