You are here

account-header-links.html.twig in Open Social 8.2

Default theme implementation to display a menu.

Available variables: Links Link:

  • classes
  • label
  • url

File

modules/social_features/social_user/templates/account-header-links.html.twig
View source
  1. {#
  2. /**
  3. * @file
  4. * Default theme implementation to display a menu.
  5. *
  6. * Available variables:
  7. * Links
  8. * Link:
  9. * - classes
  10. * - label
  11. * - url
  12. * @ingroup templates
  13. */
  14. #}
  15. <ul class="nav navbar-nav">
  16. {% for item in links|without('search_block') if item.access is not defined or item.access %}
  17. <li class="{{ item.classes }}">
  18. <a href="{{ item.url }}" class="{{ item.link_classes }}" {{ item.link_attributes }} {% if item.title %} title="{{ item.title }}" {% endif %}>
  19. {% if item.icon_image %}
  20. {{ item.icon_image }}
  21. {% elseif item.icon_classes %}
  22. <svg class="navbar-nav__icon {{ item.icon_classes }}">
  23. <use xlink:href="#{{ item.icon_classes }}" />
  24. </svg>
  25. {% endif %}
  26. <span class="{{item.title_classes}}">{{ item.label }}</span>
  27. </a>
  28. {% if item.below %}
  29. {% if item.below is iterable %}
  30. <ul class="dropdown-menu">
  31. {% for item in item.below if item.access is not defined or item.access %}
  32. {% if item.url %}
  33. <li class="{{ item.classes }}">
  34. <a href="{{ item.url }}" class="{{ item.link_classes }}" {{ item.link_attributes }} {% if item.title %} title="{{ item.title }}" {% endif %}>
  35. <span class="{{item.title_classes}}">{{ item.label }}</span>
  36. {% if item.count_icon %}
  37. <span class="{{item.count_classes}}">{{ item.count_icon }}</span>
  38. {% endif %}
  39. </a>
  40. </li>
  41. {% elseif item.divider %}
  42. <li class="{{ item.classes }}"></li>
  43. {% else %}
  44. <li class="{{ item.classes }}" {{ item.attributes }}>
  45. {{ item.tagline }}
  46. <strong class="text-truncate"> {{ item.object }} </strong>
  47. </li>
  48. {% endif %}
  49. {% endfor %}
  50. </ul>
  51. {% else %}
  52. <ul class="dropdown-menu">
  53. {{ item.below }}
  54. </ul>
  55. {% endif %}
  56. {% endif %}
  57. </li>
  58. {% endfor %}
  59. </ul>