block--system-messages-block.html.twig

Same filename in this branch
  1. 11.x core/themes/stable9/templates/block/block--system-messages-block.html.twig
  2. 11.x core/modules/system/templates/block--system-messages-block.html.twig
Same filename in other branches
  1. 9 core/themes/stable9/templates/block/block--system-messages-block.html.twig
  2. 9 core/themes/stable/templates/block/block--system-messages-block.html.twig
  3. 9 core/modules/system/templates/block--system-messages-block.html.twig
  4. 8.9.x core/themes/stable/templates/block/block--system-messages-block.html.twig
  5. 8.9.x core/modules/system/templates/block--system-messages-block.html.twig
  6. 10 core/themes/stable9/templates/block/block--system-messages-block.html.twig
  7. 10 core/modules/system/templates/block--system-messages-block.html.twig

Default theme implementation for the messages block.

Removes wrapper elements from block so that empty block does not appear when there are no messages.

Available variables:

  • content: The content of this block.

File

core/profiles/demo_umami/themes/umami/templates/classy/block/block--system-messages-block.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the messages block.
  5. *
  6. * Removes wrapper elements from block so that empty block does not appear when
  7. * there are no messages.
  8. *
  9. * Available variables:
  10. * - content: The content of this block.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {{ content }}
  16. {#
  17. The Umami theme is for demonstration only.
  18. Umami uses a web component for rendering messages. The component is
  19. "<drupal-umami-messages>".
  20. This implementation is a trial only and should not be used on production
  21. sites.
  22. @see https://www.drupal.org/project/drupal/issues/3476471
  23. @see https://developer.mozilla.org/en-US/docs/Web/API/Web_components
  24. #}
  25. <template id="umami-messages-template">
  26. <h2 part="heading">
  27. <slot name="title"></slot>
  28. </h2>
  29. <div part="content">
  30. <div part="icon"></div>
  31. <slot name="content"></slot>
  32. </div>
  33. </template>

Related topics


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