{% assign items = include.items  %}

{% if include._internal %}
  <ul data-megamenu-class="{% if include.layout == 'horizontal' %}Grid{% endif %}">
{% else %}
  <ul class="Linklist Linklist--padded u-layout-prose u-text-r-xs {% if include.dynamic %}Treeview Treeview--default js-Treeview{% endif %}">
{% endif %}

  {% assign navurl = page.url | remove: 'index.html' %}
  {% for item in items %}
  	<li data-megamenu-class="{{ item.liClass }}{% if item.image %}Grid-cell u-size1of4 u-textCenter{% endif %}" class=" with-image">

      {% if item.url == "#" %}
        {% assign _url = item.url %}
      {% else %}
        {% assign _url = item.url | relative_url %}
      {% endif %}

  		<a href="{{ _url }}" class="{% if item.url == navurl %}is-current u-textWeight-700{% endif %}">
        {% if item.image %}
        <img src="{{ item.image }}" data-megamenu-class="tool-image" class="tool-image" alt="{{ item.title }}" />
        {% endif %}

        {{ item.markup_pre }}
				{{ t[item.title] | default: item.title }}
        {{ item.markup_post }}
  		</a>
      {% if item.subitems %}
    		{% include linklist.html layout=item.layout items=item.subitems _internal=true %}
    	{% endif %}
  	</li>
  {% endfor %}

</ul>

{% assign items = include.items  %}

{% if include._internal %}
  <ul data-megamenu-class="{% if include.layout == 'horizontal' %}Grid{% endif %}">
{% else %}
  <ul class="Linklist Linklist--padded u-layout-prose u-text-r-xs {% if include.dynamic %}Treeview Treeview--default js-Treeview{% endif %}">
{% endif %}

  {% assign navurl = page.url | remove: 'index.html' %}
  {% for item in items %}
  	<li data-megamenu-class="{{ item.liClass }}{% if item.image %}Grid-cell u-size1of4 u-textCenter{% endif %}" class=" with-image">

      {% if item.url == "#" %}
        {% assign _url = item.url | relative_url %}
      {% else %}
        {% assign _url = item.url %}
      {% endif %}

  		<a href="{{ _url }}" class="{% if item.url == navurl %}is-current u-textWeight-700{% endif %}">
        {% if item.image %}
        <img src="{{ item.image }}" data-megamenu-class="tool-image" class="tool-image" alt="{{ item.title }}" />
        {% endif %}

        {{ item.markup_pre }}
				{{ t[item.title] | default: item.title }}
        {{ item.markup_post }}
  		</a>
      {% if item.subitems %}
    		{% include linklist.html layout=item.layout items=item.subitems _internal=true %}
    	{% endif %}
  	</li>
  {% endfor %}

</ul>

Fix bug in logic of megamenu links
Fix bug in logic of megamenu links
