top-bar-local-tasks.html.twig

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

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
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation for navigation top bar local tasks.
  5. *
  6. * Available variables:
  7. * - local_tasks: Array of local tasks for the current route.
  8. */
  9. #}
  10. {% set dropdown_id = 'admin-local-tasks'|clean_unique_id %}
  11. {% include '@navigation/toolbar-button.html.twig' with {
  12. attributes: create_attribute(
  13. {
  14. 'aria-expanded': 'false',
  15. 'aria-controls': dropdown_id,
  16. 'data-drupal-dropdown': 'true'
  17. }
  18. ),
  19. text: 'More actions'|t,
  20. extra_classes: 'toolbar-button--expand--down toolbar-button--weight--400 toolbar-button--tertiary--expanded toolbar-button--actions',
  21. } only %}
  22. <div class="toolbar-dropdown__menu" id={{ dropdown_id }}>
  23. <ul class="toolbar-dropdown__list">
  24. {% for local_task in local_tasks %}
  25. {{ local_task }}
  26. {% endfor %}
  27. </ul>
  28. </div>

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