Skip to content
views-view-summary.html.twig 952 B
Newer Older
{#
/**
 * @file
 * Default theme implementation to display a list of summary lines.
 *
 * Available variables:
 * - rows: The rows contained in this view.
 *   Each row contains:
 *   - url: The summary link URL.
 *   - link: The summary link text.
 *   - count: The number of items under this grouping.
 * - row_classes: HTML classes to apply to each row, indexed by row ID.
 *   This matches the index in rows.
 * - options: Flags indicating how the summary should be displayed.
 *   This contains:
 *   - count: A flag indicating whether the count should be displayed.
 *
 * @see template_preprocess()
 * @see template_preprocess_views_view_summary()
 *
 * @ingroup themeable
 */
#}
<div class="item-list">
  <ul class="views-summary">
  {% for id, row in rows %}
    <li><a href="{{ row.url }}"{{ row_classes[id] }}>{{ row.link }}</a>
      {% if options.count %}
        ({{ row.count }})
      {% endif %}
    </li>
  {% endfor %}
  </ul>
</div>