fieldset--media-library-widget.html.twig

Same filename in this branch
  1. 8.9.x core/themes/seven/templates/media-library/fieldset--media-library-widget.html.twig
Same filename in other branches
  1. 9 core/themes/seven/templates/media-library/fieldset--media-library-widget.html.twig
  2. 9 core/themes/claro/templates/media-library/fieldset--media-library-widget.html.twig
  3. 10 core/themes/claro/templates/media-library/fieldset--media-library-widget.html.twig
  4. 11.x core/themes/claro/templates/media-library/fieldset--media-library-widget.html.twig

Theme override for the media library widget.

See also

claro_preprocess_fieldset__media_library_widget()

claro_preprocess_fieldset()

template_preprocess_fieldset()

File

core/themes/claro/templates/media-library/fieldset--media-library-widget.html.twig

View source
  1. {% extends 'fieldset.html.twig' %}
  2. {#
  3. /**
  4. * @file
  5. * Theme override for the media library widget.
  6. *
  7. * @see claro_preprocess_fieldset__media_library_widget()
  8. * @see claro_preprocess_fieldset()
  9. * @see template_preprocess_fieldset()
  10. */
  11. #}
  12. {% macro media_library_prefix(prefix) %}
  13. {% if prefix.empty_selection %}
  14. <p class="media-library-widget-empty-text">{{ prefix }}</p>
  15. {% else %}
  16. {{ prefix }}
  17. {% endif %}
  18. {% endmacro %}
  19. {%
  20. set attributes = attributes.addClass('media-library-widget')
  21. %}
  22. {%
  23. set prefix = _self.media_library_prefix(prefix)
  24. %}

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