we-megamenu-li.html.twig in Drupal Mega Menu 8
<li {{ attributes }}>
{% if href is empty %}
<a href='#' data-drupal-link-system-path="<front>" class="we-megamenu-nolink">
{% if (attribute(attributes, 'data-icon') is defined and attribute(attributes, 'data-icon')|trim) %}
<i class="{{ attribute(attributes, 'data-icon') }}"></i>
{% endif %}
{{- title -}}
</a>
{% else %}
<a class="we-mega-menu-li" title="{{ attribute(attributes, 'description') }}" href="{{ href }}" target="{{ attribute(attributes, 'data-target') }}">
{% if (attribute(attributes, 'data-icon') is defined and attribute(attributes, 'data-icon')|trim) %}
<i class="{{ attribute(attributes, 'data-icon') }}"></i>
{% endif %}
{{- title -}}
{% if (attribute(attributes, 'data-caption') is defined and attribute(attributes, 'data-caption')|trim) %}
<span class="we-mega-menu-caption">{{ attribute(attributes, 'data-caption') }}</span>
{% endif %}
</a>
{% endif %}
{{ content }}
</li>
File
templates/we-megamenu-li.html.twig
View source
- <li {{ attributes }}>
- {% if href is empty %}
- <a href='#' data-drupal-link-system-path="<front>" class="we-megamenu-nolink">
- {% if (attribute(attributes, 'data-icon') is defined and attribute(attributes, 'data-icon')|trim) %}
- <i class="{{ attribute(attributes, 'data-icon') }}"></i>
- {% endif %}
-
- {{- title -}}
- </a>
- {% else %}
- <a class="we-mega-menu-li" title="{{ attribute(attributes, 'description') }}" href="{{ href }}" target="{{ attribute(attributes, 'data-target') }}">
- {% if (attribute(attributes, 'data-icon') is defined and attribute(attributes, 'data-icon')|trim) %}
- <i class="{{ attribute(attributes, 'data-icon') }}"></i>
- {% endif %}
-
- {{- title -}}
-
- {% if (attribute(attributes, 'data-caption') is defined and attribute(attributes, 'data-caption')|trim) %}
- <span class="we-mega-menu-caption">{{ attribute(attributes, 'data-caption') }}</span>
- {% endif %}
- </a>
- {% endif %}
- {{ content }}
- </li>