Remove external link support in sub navigation

This navigation will only have internal links in it.
This commit is contained in:
Chris Hill-Scott
2017-12-01 10:27:56 +00:00
parent b6096dbe06
commit 1817d3f091

View File

@@ -3,22 +3,17 @@
) %}
<nav class="sub-navigation">
<ol itemscope itemtype="http://schema.org/ItemList">
{% for item in item_set %}
<li class="sub-navigation__item {% if item['link'] == request.endpoint %} sub-navigation__item--active {% endif %}"
itemprop="itemListElement"
itemscope
{% for item in item_set %}
<li class="sub-navigation__item {% if item['link'] == request.endpoint %} sub-navigation__item--active {% endif %}"
itemprop="itemListElement"
itemscope
itemtype="http://schema.org/ListItem"
>
<a href="{%- if item['external_link'] -%}
{{ item['link'] }}
{%- else -%}
{{ url_for(item['link']) }}
{%- endif -%}"
itemprop="item">
<a href="{{ url_for(item['link']) }}" itemprop="item">
<span itemprop="name">{{item['name']}}</span>
</a>
</li>
{% endfor %}
</ol>
</nav>
{% endmacro %}
{% endmacro %}