top-bar-local-tasks.html.twig

Same filename in other branches
  1. 11.x 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' 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. modifiers: [
  21. 'expand--down',
  22. 'weight--400',
  23. 'small-offset',
  24. ],
  25. } only %}
  26. <div class="toolbar-dropdown__menu" id={{ dropdown_id }}>
  27. <ul class="toolbar-dropdown__list">
  28. {% for local_task in local_tasks %}
  29. {{ local_task }}
  30. {% endfor %}
  31. </ul>
  32. </div>

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