file menu-local-tasks.html.twig

Theme override 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.

File

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 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. * @see uikit_preprocess_menu_local_tasks()
  14. *
  15. * @ingroup uikit_themeable
  16. */
  17. #}
  18. {% if primary %}
  19. <div id="primary-tasks">
  20. <h2 class="visually-hidden">{{ 'Primary tasks'|t }}</h2>
  21. <ul{{ primary_attributes }}>{{ primary }}</ul>
  22. </div>
  23. {% endif %}
  24. {% if secondary %}
  25. <div id="secondary-tasks">
  26. <h2 class="visually-hidden">{{ 'Secondary tasks'|t }}</h2>
  27. <ul{{ secondary_attributes }}>{{ secondary }}</ul>
  28. </div>
  29. {% endif %}

Add new comment

Filtered HTML

  • Web page addresses and e-mail addresses turn into links automatically.
  • Allowed HTML tags: <a> <em> <strong> <cite> <blockquote> <code> <ul> <ol> <li> <dl> <dt> <dd>
  • Lines and paragraphs break automatically.

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.

Log in