Skip to content

Commit c46553a

Browse files
committed
target blank for external url
1 parent 85ef6c5 commit c46553a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

templates/base.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,7 @@
221221
<li class="home-menu-item"><a href="{{ url('home') }}" class="nav-home">{{ _('Home') }}</a></li>
222222
{% for node in mptt_tree(nav_bar) recursive %}
223223
<li>
224-
<a href="{{ node.path }}" class="nav-{{ node.key }}{% if node.key in nav_tab %} active{% endif %}">
224+
<a href="{{ node.path }}" {%if node.path.startswith('http') %}target="_blank"{% endif %} class="nav-{{ node.key }}{% if node.key in nav_tab %} active{% endif %}">
225225
{{ _(node.label) }}
226226
{% if not node.is_leaf_node() %}
227227
<div class="nav-expand">&gt;</div>
@@ -233,7 +233,7 @@
233233
</li>
234234
{% endfor %}
235235
{% if request.user.is_authenticated and request.profile.about %}
236-
<li class="nav-container-link"><a href="{{ request.profile.about }}">{{ _('Container link') }}</a></li>
236+
<li class="nav-container-link"><a href="{{ request.profile.about }}" target="_blank">{{ _('Container link') }}</a></li>
237237
{% endif %}
238238
{% else %}
239239
{% macro make_navbar_item(key, url, text) %}

0 commit comments

Comments
 (0)