navigation--message.html.twig

Default theme implementation to display a single message in the navigation toolbar.

Available variables:

  • content: The message to display.
1 theme call to navigation--message.html.twig
DemoUmamiHooks::navigationContentTop in core/profiles/demo_umami/src/Hook/DemoUmamiHooks.php
Implements hook_navigation_content_top().

File

core/modules/navigation/templates/navigation--message.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a single message in the navigation toolbar.
  5. *
  6. * Available variables:
  7. * - content: The message to display.
  8. *
  9. * @ingroup themeable
  10. */
  11. #}
  12. {%
  13. set classes = [
  14. 'toolbar-message',
  15. 'toolbar-message--type--' ~ type,
  16. ]
  17. %}
  18. {% if url is not empty %}
  19. <a {{ attributes.addClass(classes).setAttribute('href', url).setAttribute('data-drupal-tooltip', content).setAttribute('data-drupal-tooltip-class', 'admin-toolbar__tooltip') }}>
  20. <div class="toolbar-message__label">
  21. {{ content }}
  22. </div>
  23. </a>
  24. {% else %}
  25. <div {{ attributes.addClass(classes) }}>
  26. <div class="toolbar-message__label">
  27. {{ content }}
  28. </div>
  29. </div>
  30. {% endif %}

Related topics


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