templates/fe/_menu_desktop.html.twig line 1

Open in your IDE?
  1. <nav class="m-header-navbar">
  2. <div class="l-container">
  3. <ul class="m-header-navbar-menu l-mega-dropdown-container">
  4. <li class="m-header-navbar-menu-item">
  5. <a href="{{ path('fe_home') }}"
  6. class="m-header-navbar-menu-item-link {{ cr in ["fe_home"] ? "active" }}">
  7. {{ "home_txt"|trans }}
  8. </a>
  9. </li>
  10. {% if hasOnSale %}
  11. <li class="m-header-navbar-menu-item">
  12. <a href="{{ path("fe_product_filter_sale") }}"
  13. class="m-header-navbar-menu-item-link {{ cr in ["fe_product_filter_sale"] ? "active" }}">
  14. {{ "on_sale_txt"|trans }}
  15. </a>
  16. </li>
  17. {% endif %}
  18. {% if mainCategories|length > 0 %}
  19. <li class="m-header-navbar-menu-item" data-l-mega-dropdown="true" data-header-mega-dropdown="true">
  20. <button type="button"
  21. class="m-header-navbar-menu-item-link dropdown ui-mega-dropdown-button l-mega-dropdown-button {{ cr in ['fe_category_index', 'fe_product_filter_category', 'fe_category_index'] ? "active" }}"
  22. data-l-mega-dropdown-button="true">
  23. {{ "categories_txt"|trans }}
  24. </button>
  25. <div class="m-header-navbar-megamenu-dropdown ui-mega-dropdown l-mega-dropdown lg"
  26. data-l-mega-dropdown-menu="true">
  27. <div class="m-header-navbar-megamenu-header">
  28. <h5 class="m-header-navbar-megamenu-title">{{ "categories_txt"|trans }}</h5>
  29. <a class="m-header-navbar-megamenu-action" href="{{ path('fe_category_index') }}">
  30. <span>{{ "view_all_txt"|trans }}</span>
  31. <span class="m-header-navbar-megamenu-action-icon">
  32. <svg width="5" height="8" viewBox="0 0 5 8" fill="none"
  33. xmlns="http://www.w3.org/2000/svg">
  34. <path d="M0.207558 0.207048C-0.0691864 0.48311 -0.0691864 0.930988 0.207558 1.20738L3.2901 3.99988L0.207558 6.79239C-0.0691862 7.06878 -0.0691861 7.51633 0.207558 7.79271C0.484303 8.0691 0.932566 8.0691 1.20931 7.79271L4.79539 4.54432C4.94492 4.39481 5.01086 4.19567 4.99855 3.99987C5.01086 3.80441 4.94492 3.60493 4.79539 3.45543L1.20931 0.207035C0.932566 -0.0690136 0.484316 -0.0690146 0.207558 0.207048Z"
  35. fill="#686868"/>
  36. </svg>
  37. </span>
  38. </a>
  39. </div>
  40. <div class="m-header-navbar-megamenu-row">
  41. {% for row in mainCategories|batch( mainCategories|length / 4) %}
  42. <div class="m-header-navbar-megamenu-col">
  43. <ul class="m-header-navbar-megamenu">
  44. {% for category in row %}
  45. {% set categoryUrl = path('fe_category_index',{'slug':category.seo.slug}) %}
  46. {% if category.concatIds is same as(category.id|trans) %} {# convert int to string to check #}
  47. {% set categoryUrl = path('fe_product_filter_category',{'slug':category.seo.slug}) %}
  48. {% endif %}
  49. <li class="m-header-navbar-megamenu-item">
  50. <a href="{{ categoryUrl }}" class="m-header-navbar-megamenu-item-link">
  51. {{ category.title }}
  52. </a>
  53. </li>
  54. {% endfor %}
  55. </ul>
  56. </div>
  57. {% endfor %}
  58. </div>
  59. </div>
  60. </li>
  61. {% endif %}
  62. {% if constant("App\\BaseBundle\\SystemConfiguration::ENABLE_COLLECTION") %}
  63. <li class="m-header-navbar-menu-item">
  64. <a href="{{ path('fe_collection_index') }}"
  65. class="m-header-navbar-menu-item-link {{ cr in ['fe_collection_index', "fe_product_filter_collection"] ? "active" }}">
  66. {{ "collections_txt"|trans }}
  67. </a>
  68. </li>
  69. {% endif %}
  70. <li class="m-header-navbar-menu-item">
  71. <a href="{{ path('fe_brand_index') }}"
  72. class="m-header-navbar-menu-item-link {{ cr in ['fe_brand_index', "fe_product_filter_brand"] ? "active" }}">
  73. {{ "brands_txt"|trans }}
  74. </a>
  75. </li>
  76. {% if occasion is not empty %}
  77. <li class="m-header-navbar-menu-item">
  78. <a href="{{ path('fe_product_filter_occasion', {"slug": occasion.seo.slug}) }}"
  79. class="m-header-navbar-menu-item-link {{ cr in ["fe_product_filter_occasion"] ? "active" }}">
  80. {{ occasion.title }}
  81. </a>
  82. </li>
  83. {% endif %}
  84. {% include "custom/frontEnd/_menu_desktop.html.twig" %}
  85. {# <li class="m-header-navbar-menu-item">#}
  86. {# <a href="{{ path('fe_project_index') }}"#}
  87. {# class="m-header-navbar-menu-item-link {{ cr in ['fe_project_index', "fe_project_show"] ? "active" }}">#}
  88. {# Projects#}
  89. {# </a>#}
  90. {# </li>#}
  91. <li class="m-header-navbar-menu-item">
  92. <a href="{{ path('fe_blog_index') }}"
  93. class="m-header-navbar-menu-item-link {{ cr in ['fe_blog_index', "fe_blog_show"] ? "active" }}">
  94. {{ "blogs_txt"|trans }}
  95. </a>
  96. </li>
  97. </ul>
  98. </div>
  99. </nav>