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
- {#
- /**
- * @file
- * Default theme implementation to display a single message in the navigation toolbar.
- *
- * Available variables:
- * - content: The message to display.
- *
- * @ingroup themeable
- */
- #}
- {%
- set classes = [
- 'toolbar-message',
- 'toolbar-message--type--' ~ type,
- ]
- %}
-
- {% if url is not empty %}
- <a {{ attributes.addClass(classes).setAttribute('href', url).setAttribute('data-drupal-tooltip', content).setAttribute('data-drupal-tooltip-class', 'admin-toolbar__tooltip') }}>
- <div class="toolbar-message__label">
- {{ content }}
- </div>
- </a>
- {% else %}
- <div {{ attributes.addClass(classes) }}>
- <div class="toolbar-message__label">
- {{ content }}
- </div>
- </div>
- {% endif %}
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.