templates/bundles/SyliusShopBundle/Layout/Topbar/_topbarNavigation.html.twig line 1

Open in your IDE?
  1. {% if app.request.attributes.get('_route') == 'app_tech_videos' %}
  2.     {% set activeRoute = 'tech_videos' %}
  3. {% elseif app.request.attributes.get('_route') == 'app_tech_advisory' %}
  4.     {% set activeRoute = 'tech_advisory' %}
  5. {% elseif app.request.attributes.get('_route') == 'app_tech_knowledge' %}
  6.     {% set activeRoute = 'tech_knowledge' %}
  7. {% elseif app.request.attributes.get('_route') in ['app_crfq_create', 'bitbag_organization_shop_user_request_search', 'bitbag_organization_shop_user_request_join_or_claim'] %}
  8.     {% set activeRoute = 'suppliers' %}
  9. {% else %}
  10.     {% set activeRoute = 'marketplace' %}
  11. {% endif %}
  12. <div class="topbar-navigation desktop-menu">
  13.     <div class="topbar-navigation--item{{ activeRoute == 'marketplace' ? ' active' : '' }}">
  14.         <a href="{{ url('sylius_shop_homepage') }}" class="font-bold">
  15.             {{ 'app.ui.marketplace'|trans }}
  16.         </a>
  17.     </div>
  18.     {% if sylius.channel.isCRFQEnabled %}
  19.     <div class="topbar-navigation--item{{ activeRoute == 'suppliers' ? ' active' : '' }}">
  20.         <a href="{{ url('app_crfq_create') }}" class="font-bold">
  21.             {{ 'app.ui.header.suppliers'|trans }}
  22.         </a>
  23.     </div>
  24.     {% endif %}
  25.     <div class="topbar-navigation--item{{ activeRoute == 'tech_videos' ? ' active' : '' }}">
  26.         <a href="{{ url('app_tech_videos') }}" class="font-bold">
  27.             {{ 'app.ui.header.videos'|trans }}
  28.         </a>
  29.     </div>
  30.     <div class="topbar-navigation--item{{ activeRoute == 'tech_knowledge' ? ' active' : '' }}">
  31.         <a href="{{ url('app_tech_knowledge', {'_locale': app.request.locale, 'tech_knowledge': 'tech_knowledge'|trans }) }}" class="font-bold">
  32.             {{ 'app.ui.header.knowledge'|trans }}
  33.         </a>
  34.     </div>
  35.     <div class="topbar-navigation--item{{ activeRoute == 'tech_advisory' ? ' active' : '' }}">
  36.         <a href="{{ url('app_tech_advisory') }}" class="font-bold">
  37.             {{ 'app.ui.header.advisory'|trans }}
  38.         </a>
  39.     </div>
  40.     <div class="topbar-navigation--item">
  41.         <a href="https://community.hyfindr.com/" target="_blank" class="font-bold">
  42.             {{ 'app.ui.header.community'|trans }}
  43.         </a>
  44.     </div>
  45. </div>