custom/plugins/H1webMegaMenu/src/Resources/views/storefront/layout/navigation/megamenu/link.html.twig line 1

Open in your IDE?
  1. {% block megamenu_link %}
  2.     <a href="{{ link }}"
  3.        itemprop="url"
  4.        title="{{ name }}"
  5.        {% if blank %}target="_blank"{% endif %}
  6.        {% if id is same as(activeId) %}class="active"{% endif %}
  7.     >
  8.         {% if hasChildren %}
  9.             <div class="d-flex w-100 justify-content-between">
  10.                 <div>
  11.                     {% if icon %}
  12.                         {% sw_thumbnails 'megamenu-icon' with {
  13.                             media: icon,
  14.                             sizes: {
  15.                                 'default': '20px'
  16.                             },
  17.                             attributes: {
  18.                                 'class': 'category-icon',
  19.                                 'alt': name,
  20.                                 'title': name,
  21.                                 'loading': 'lazy'
  22.                             }
  23.                         } %}
  24.                     {% endif %}
  25.                     <span itemprop="name">{{ name }}</span>
  26.                 </div>
  27.                 {% sw_icon 'arrow-medium-down' style {'pack': 'solid', 'size': 'xs', 'class': 'filter-panel-item-toggle'} %}
  28.             </div>
  29.         {% else %}
  30.             {% if icon %}
  31.                 {% sw_thumbnails 'megamenu-icon' with {
  32.                     media: icon,
  33.                     sizes: {
  34.                         'default': '20px'
  35.                     },
  36.                     attributes: {
  37.                         'class': 'category-icon',
  38.                         'alt': name,
  39.                         'title': name,
  40.                         'loading': 'lazy'
  41.                     }
  42.                 } %}
  43.             {% endif %}
  44.             <span itemprop="name">{{ name }}</span>
  45.         {% endif %}
  46.     </a>
  47. {% endblock %}