top-bar.html.twig
Default theme implementation for the navigation top bar.
Available variables:
- local_tasks: The local tasks for the current route.
1 theme call to top-bar.html.twig
- NavigationRenderer::buildTopBar in core/modules/ navigation/ src/ NavigationRenderer.php 
- Build the top bar for content entity pages.
File
- 
              core/modules/ navigation/ templates/ top-bar.html.twig 
View source
- {#
- /**
-  * @file
-  * Default theme implementation for the navigation top bar.
-  *
-  * Available variables:
-  * - local_tasks: The local tasks for the current route.
-  *
-  * @ingroup themeable
-  */
- #}
- {% set attributes = create_attribute() %}
- {% if local_tasks %}
-   {% set attributes = attributes.setAttribute('data-offset-top', '') %}
-   <div {{ attributes.addClass('top-bar').setAttribute('data-drupal-admin-styles', '') }}>
-     <div class="top-bar__content">
-       {{ local_tasks }}
-     </div>
-   </div>
- {% endif %}
Related topics
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
