views-view-summary.html.twig

Same filename in this branch
  1. 10 core/profiles/demo_umami/themes/umami/templates/classy/views/views-view-summary.html.twig
  2. 10 core/themes/stable9/templates/views/views-view-summary.html.twig
  3. 10 core/themes/claro/templates/classy/views/views-view-summary.html.twig
  4. 10 core/modules/views/templates/views-view-summary.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/views/views-view-summary.html.twig
  2. 9 core/themes/stable9/templates/views/views-view-summary.html.twig
  3. 9 core/themes/seven/templates/classy/views/views-view-summary.html.twig
  4. 9 core/themes/claro/templates/classy/views/views-view-summary.html.twig
  5. 9 core/themes/bartik/templates/classy/views/views-view-summary.html.twig
  6. 9 core/themes/stable/templates/views/views-view-summary.html.twig
  7. 9 core/themes/starterkit_theme/templates/views/views-view-summary.html.twig
  8. 9 core/themes/classy/templates/views/views-view-summary.html.twig
  9. 9 core/modules/views/templates/views-view-summary.html.twig
  10. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/views/views-view-summary.html.twig
  11. 8.9.x core/themes/seven/templates/classy/views/views-view-summary.html.twig
  12. 8.9.x core/themes/claro/templates/classy/views/views-view-summary.html.twig
  13. 8.9.x core/themes/bartik/templates/classy/views/views-view-summary.html.twig
  14. 8.9.x core/themes/stable/templates/views/views-view-summary.html.twig
  15. 8.9.x core/themes/classy/templates/views/views-view-summary.html.twig
  16. 8.9.x core/modules/views/templates/views-view-summary.html.twig
  17. 11.x core/profiles/demo_umami/themes/umami/templates/classy/views/views-view-summary.html.twig
  18. 11.x core/themes/stable9/templates/views/views-view-summary.html.twig
  19. 11.x core/themes/claro/templates/classy/views/views-view-summary.html.twig
  20. 11.x core/themes/starterkit_theme/templates/views/views-view-summary.html.twig
  21. 11.x core/modules/views/templates/views-view-summary.html.twig

Theme override 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.
    • attributes: HTML attributes to apply to each row.
    • active: A flag indicating whether the row is active.
  • options: Flags indicating how the summary should be displayed. This contains:

    • count: A flag indicating whether the count should be displayed.

See also

template_preprocess_views_view_summary()

File

core/themes/starterkit_theme/templates/views/views-view-summary.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override to display a list of summary lines.
  5. *
  6. * Available variables:
  7. * - rows: The rows contained in this view.
  8. * Each row contains:
  9. * - url: The summary link URL.
  10. * - link: The summary link text.
  11. * - count: The number of items under this grouping.
  12. * - attributes: HTML attributes to apply to each row.
  13. * - active: A flag indicating whether the row is active.
  14. * - options: Flags indicating how the summary should be displayed.
  15. * This contains:
  16. * - count: A flag indicating whether the count should be displayed.
  17. *
  18. * @see template_preprocess_views_view_summary()
  19. */
  20. #}
  21. <div class="item-list">
  22. <ul class="views-summary">
  23. {% for row in rows %}
  24. <li><a href="{{ row.url }}"{{ row.attributes.addClass(row.active ? 'is-active')|without('href') }}>{{ row.link }}</a>
  25. {% if options.count %}
  26. ({{ row.count }})
  27. {% endif %}
  28. </li>
  29. {% endfor %}
  30. </ul>
  31. </div>

Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.