You are here

menu-local-tasks.html.twig in Drupal 10

Theme override 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/themes/stable9/templates/navigation/menu-local-tasks.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Theme override 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. #}
  14. {% if primary %}
  15. <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  16. <ul>{{ primary }}</ul>
  17. {% endif %}
  18. {% if secondary %}
  19. <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  20. <ul>{{ secondary }}</ul>
  21. {% endif %}