top-bar.html.twig

Same filename in other branches
  1. 10 core/modules/navigation/templates/top-bar.html.twig

Default theme implementation for the navigation top bar.

Available variables:

  • element: The top bar render element.
  • tools: The tools region of the top bar.
  • context: The context region of the top bar.
  • actions: The actions region of the top bar.
1 theme call to top-bar.html.twig
TopBar::getInfo in core/modules/navigation/src/Element/TopBar.php
Returns the element properties for this element.

File

core/modules/navigation/templates/top-bar.html.twig

View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for the navigation top bar.
  5. *
  6. * Available variables:
  7. * - element: The top bar render element.
  8. * - tools: The tools region of the top bar.
  9. * - context: The context region of the top bar.
  10. * - actions: The actions region of the top bar.
  11. *
  12. * @ingroup themeable
  13. */
  14. #}
  15. {% set attributes = create_attribute() %}
  16. <div {{ attributes.addClass('top-bar').setAttribute('data-drupal-admin-styles', '') }}>
  17. <div class="top-bar__content">
  18. <div class="top-bar__tools">
  19. {{- tools -}}
  20. </div>
  21. <div class="top-bar__context">
  22. {{- context -}}
  23. </div>
  24. <div class="top-bar__actions">
  25. {{- actions -}}
  26. </div>
  27. </div>
  28. </div>

Related topics


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