Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 024ab7b

Browse files
author
Artem Bazykin
committed
DENSWXCDIG-12 / Fixed link data/
1 parent 45e7a07 commit 024ab7b

2 files changed

Lines changed: 10 additions & 2 deletions

File tree

ckanext/drupal_menu_sync/templates/footer.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@
55
{% if footer_menu != None %}
66
<ul class="unstyled">
77
{% for item in footer_menu %}
8-
<li><a href="{{item['link']}}">{{item['title']}}</a></li>
8+
{% if item['link'].startwith('http') or item['link'].startwith('/') %}
9+
<li><a href="{{ item['link'] }}">{{item['title']}}</a></li>
10+
{% else %}
11+
<li><a href="/{{ item['link'] }}">{{item['title']}}</a></li>
12+
{% endif %}
913
{% endfor %}
1014
</ul>
1115
{% else %}

ckanext/drupal_menu_sync/templates/header.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,11 @@
88
<nav class="section navigation">
99
<ul class="nav nav-pills">
1010
{% for item in header_menu %}
11-
<li class="{{ 'active' if (item['link'] == current_url) else '' }}"><a href="{{ item['link'] }}">{{item['title']}}</a></li>
11+
{% if item['link'].startwith('http') or item['link'].startwith('/') %}
12+
<li class="{{ 'active' if (item['link'] == current_url) else '' }}"><a href="{{ item['link'] }}">{{item['title']}}</a></li>
13+
{% else %}
14+
<li class="{{ 'active' if (item['link'] == current_url) else '' }}"><a href="/{{ item['link'] }}">{{item['title']}}</a></li>
15+
{% endif %}
1216
{% endfor %}
1317
</ul>
1418
</nav>

0 commit comments

Comments
 (0)