views-view-summary.html.twig 958 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11
{#
/**
 * @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.
12
 *   - attributes: HTML attributes to apply to each row.
13
 *   - active: A flag indicating whtether the row is active.
14 15 16 17 18 19 20 21 22
 * - options: Flags indicating how the summary should be displayed.
 *   This contains:
 *   - count: A flag indicating whether the count should be displayed.
 *
 * @see template_preprocess_views_view_summary()
 *
 * @ingroup themeable
 */
#}
23 24 25
<div class="item-list">
  <ul class="views-summary">
  {% for row in rows %}
26
    <li><a href="{{ row.url }}"{{ row.attributes.addClass(row.active ? 'active') }}>{{ row.link }}</a>
27 28 29 30 31 32 33
      {% if options.count %}
        ({{ row.count }})
      {% endif %}
    </li>
  {% endfor %}
  </ul>
</div>