file 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 primary tasks.
Each item in these variables (primary and secondary) can be individually themed in menu-local-task.html.twig.

See Also

  • template_preprocess_menu_local_tasks()
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 primary 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 templates
  14. *
  15. * @see template_preprocess_menu_local_tasks()
  16. */
  17. #}
  18. {% if primary %}
  19. <h2 class="visually-hidden">{{ 'Primary tabs'|t }}</h2>
  20. <ul class="tabs--primary nav nav-tabs">{{ primary }}</ul>
  21. {% endif %}
  22. {% if secondary %}
  23. <h2 class="visually-hidden">{{ 'Secondary tabs'|t }}</h2>
  24. <ul class="tabs--secondary pagination pagination-sm">{{ secondary }}</ul>
  25. {% endif %}

Related topics