media-library-item--small.html.twig

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

Default theme implementation of a media library item.

This is used when displaying selected media items, either in the field widget or in the "Additional selected media" area when adding new media items in the media library modal dialog.

Available variables:

  • attributes: HTML attributes for the containing element.
  • content: The content of the media library item, plus any additional fields or elements surrounding it.

See also

seven_preprocess_media_library_item__small()

seven_preprocess_media_library_item__widget()

template_preprocess_media_library_item()

1 theme call to media-library-item--small.html.twig
AddFormBase::buildSelectedItemElement in core/modules/media_library/src/Form/AddFormBase.php
Returns a render array for a single pre-selected media item.

File

core/themes/claro/templates/classy/media-library/media-library-item--small.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation of a media library item.
  5. *
  6. * This is used when displaying selected media items, either in the field
  7. * widget or in the "Additional selected media" area when adding new
  8. * media items in the media library modal dialog.
  9. *
  10. * Available variables:
  11. * - attributes: HTML attributes for the containing element.
  12. * - content: The content of the media library item, plus any additional
  13. * fields or elements surrounding it.
  14. *
  15. * @see seven_preprocess_media_library_item__small()
  16. * @see seven_preprocess_media_library_item__widget()
  17. * @see template_preprocess_media_library_item()
  18. *
  19. * @ingroup themeable
  20. */
  21. #}
  22. {%
  23. set classes = [
  24. 'media-library-item',
  25. 'media-library-item--grid',
  26. 'media-library-item--small',
  27. ]
  28. %}
  29. <div{{ attributes.addClass(classes) }}>
  30. {{ content }}
  31. </div>

Related topics


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