views-view-unformatted--media-library.html.twig

Same filename in this branch
  1. 11.x core/profiles/demo_umami/themes/umami/templates/classy/media-library/views-view-unformatted--media-library.html.twig
Same filename in other branches
  1. 9 core/profiles/demo_umami/themes/umami/templates/classy/media-library/views-view-unformatted--media-library.html.twig
  2. 9 core/themes/seven/templates/media-library/views-view-unformatted--media-library.html.twig
  3. 9 core/themes/claro/templates/media-library/views-view-unformatted--media-library.html.twig
  4. 9 core/themes/bartik/templates/classy/media-library/views-view-unformatted--media-library.html.twig
  5. 9 core/themes/classy/templates/media-library/views-view-unformatted--media-library.html.twig
  6. 8.9.x core/profiles/demo_umami/themes/umami/templates/classy/media-library/views-view-unformatted--media-library.html.twig
  7. 8.9.x core/themes/seven/templates/media-library/views-view-unformatted--media-library.html.twig
  8. 8.9.x core/themes/claro/templates/media-library/views-view-unformatted--media-library.html.twig
  9. 8.9.x core/themes/bartik/templates/classy/media-library/views-view-unformatted--media-library.html.twig
  10. 8.9.x core/themes/classy/templates/media-library/views-view-unformatted--media-library.html.twig
  11. 10 core/profiles/demo_umami/themes/umami/templates/classy/media-library/views-view-unformatted--media-library.html.twig
  12. 10 core/themes/claro/templates/media-library/views-view-unformatted--media-library.html.twig

Theme override for the media_library display 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.
  • view: The view object.
  • default_row_class: A flag indicating whether default classes should be used on rows.

See also

template_preprocess_views_view_unformatted()

File

core/themes/claro/templates/media-library/views-view-unformatted--media-library.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override for the media_library display of unformatted rows.
  5. *
  6. * Available variables:
  7. * - title: The title of this group of rows. May be empty.
  8. * - rows: A list of the view's row items.
  9. * - attributes: The row's HTML attributes.
  10. * - content: The row's content.
  11. * - view: The view object.
  12. * - default_row_class: A flag indicating whether default classes should be
  13. * used on rows.
  14. *
  15. * @see template_preprocess_views_view_unformatted()
  16. */
  17. #}
  18. {% if title %}
  19. <h3>{{ title }}</h3>
  20. {% endif %}
  21. <div class="media-library-views-form__rows">
  22. {% for row in rows %}
  23. {%
  24. set row_classes = [
  25. default_row_class ? 'views-row',
  26. 'media-library-item',
  27. 'media-library-item--grid',
  28. ]
  29. %}
  30. <div{{ row.attributes.addClass(row_classes) }}>
  31. {{- row.content -}}
  32. </div>
  33. {% endfor %}
  34. </div>

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