Skip to main content
Drupal API
User account menu
  • Log in

Breadcrumb

  1. Drupal Core 11.1.x

container--media-library-content.html.twig

Same filename in this branch
  1. 11.1.x core/themes/claro/templates/classy/media-library/container--media-library-content.html.twig

Theme implementation the content area of the modal media library dialog.

The content area is everything that is not the menu of available media types. This includes the form to add new media items, if available, and the view of available media to select.

Available variables:

  • attributes: HTML attributes for the containing element.
  • children: The rendered child elements of the container.
  • has_parent: A flag to indicate that the container has one or more parent containers.

See also

template_preprocess_container()

File

core/profiles/demo_umami/themes/umami/templates/classy/media-library/container--media-library-content.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Theme implementation the content area of the modal media library dialog.
  5. *
  6. * The content area is everything that is not the menu of available media
  7. * types. This includes the form to add new media items, if available, and
  8. * the view of available media to select.
  9. *
  10. * Available variables:
  11. * - attributes: HTML attributes for the containing element.
  12. * - children: The rendered child elements of the container.
  13. * - has_parent: A flag to indicate that the container has one or more parent
  14. containers.
  15. *
  16. * @see template_preprocess_container()
  17. *
  18. * @ingroup themeable
  19. */
  20. #}
  21. {%
  22. set classes = [
  23. has_parent ? 'js-form-wrapper',
  24. has_parent ? 'form-wrapper',
  25. 'media-library-content',
  26. ]
  27. %}
  28. <div{{ attributes.addClass(classes) }}>{{ children }}</div>

Related topics

Theme system overview
Functions and templates for the user interface that themes can override.
RSS feed
Powered by Drupal