Same filename in this branch
  1. 10 core/modules/system/templates/menu-local-tasks.html.twig
  2. 10 core/themes/claro/templates/menu-local-tasks.html.twig
  3. 10 core/themes/olivero/templates/navigation/menu-local-tasks.html.twig
  4. 10 core/themes/stable9/templates/navigation/menu-local-tasks.html.twig
  5. 10 core/themes/starterkit_theme/templates/navigation/menu-local-tasks.html.twig
  6. 10 core/profiles/demo_umami/themes/umami/templates/components/navigation/menu-local-tasks.html.twig
Same filename and directory in other branches
  1. 8.9.x core/modules/system/templates/menu-local-tasks.html.twig
  2. 9 core/modules/system/templates/menu-local-tasks.html.twig

Default theme implementation to display primary and secondary local tasks.

Available variables:

  • primary: HTML list items representing primary tasks.
  • secondary: HTML list items representing secondary tasks.

Each item in these variables (primary and secondary) can be individually themed in menu-local-task.html.twig.

File

core/modules/system/templates/menu-local-tasks.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display primary and secondary local tasks.
  5. *
  6. * Available variables:
  7. * - primary: HTML list items representing primary tasks.
  8. * - secondary: HTML list items representing secondary tasks.
  9. *
  10. * Each item in these variables (primary and secondary) can be individually
  11. * themed in menu-local-task.html.twig.
  12. *
  13. * @ingroup themeable
  14. */
  15. #}
  16. {% if primary %}
  17. <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  18. <ul>{{ primary }}</ul>
  19. {% endif %}
  20. {% if secondary %}
  21. <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  22. <ul>{{ secondary }}</ul>
  23. {% endif %}

Related topics