top-bar-local-tasks.html.twig
Same filename in other branches
Default theme implementation for navigation top bar local tasks.
Available variables:
- local_tasks: Array of local tasks for the current route.
1 theme call to top-bar-local-tasks.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-local-tasks.html.twig
View source
- {#
- /**
- * @file
- * Default theme implementation for navigation top bar local tasks.
- *
- * Available variables:
- * - local_tasks: Array of local tasks for the current route.
- */
- #}
- {% set dropdown_id = 'admin-local-tasks'|clean_unique_id %}
- {% include 'navigation:toolbar-button' with {
- attributes: create_attribute(
- {
- 'aria-expanded': 'false',
- 'aria-controls': dropdown_id,
- 'data-drupal-dropdown': 'true'
- }
- ),
- text: 'More actions'|t,
- modifiers: [
- 'expand--down',
- 'weight--400',
- 'small-offset',
- ],
- } only %}
- <div class="toolbar-dropdown__menu" id={{ dropdown_id }}>
- <ul class="toolbar-dropdown__list">
- {% for local_task in local_tasks %}
- {{ local_task }}
- {% endfor %}
- </ul>
- </div>
Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.