Answer the question
In order to leave comments, you need to log in
How to display a summary for a field in a block-view theming file (block--views-....html.twig)?
All actions take place on a site with Drupal 8 installed on it. There is a block on the main page, which is a view that displays the 3 latest news of the site. Each news has 3 fields:
{% for row in content['#view'].result %}
{{ content['#view'].field['field_publish_date'].value(row) }}
{{ content['#view'].field['field_title'].value(row) }}
{{ content['#view'].field['field_body'].value(row) }}
{% endfor %}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question