Commit 63d8deba authored by Joost Rijneveld's avatar Joost Rijneveld
Browse files

Merge branch '42-add-wiki-to-the-menu' into 'master'

Allow to set static urls in the menu

Closes #42

See merge request !47
parents dc613930 fb2036c8
......@@ -18,7 +18,7 @@ main = [
{'title': _('Photos'), 'name': 'photos:index'},
{'title': _('Statistics'), 'name': '#'},
{'title': _('Become Active'), 'name': 'become-active'},
{'title': _('Wiki'), 'name': '#'},
{'title': _('Wiki'), 'url': '/wiki/'},
]},
{'title': _('Calendar'), 'name': '#'},
{'title': _('Career'), 'name': 'partners:index', 'submenu': [
......
......@@ -9,7 +9,8 @@
{% if not item.authenticated or request.user.is_authenticated %}
{% url item.name as path %}
<li {% if request.path == path %}class="nav-path-selected"{% endif %}>
<a href="{{ path }}" target="_self" {% if request.path == path %}class="nav-path-selected"{% endif %}>
<a href="{% if path %}{{ path }}{% else %}{{ item.url }}{% endif %}"
target="_self" {% if request.path == path %}class="nav-path-selected"{% endif %}>
{{ item.title }}
</a>
{% if 'submenu' in item %}
......
......@@ -2,7 +2,7 @@
{% for item in submenu %}
{% url item.name as path %}
<li {% if request.path == path %}class="nav-selected nav-path-selected"{% endif %}>
<a href="{{ path }}"
<a href="{% if path %}{{ path }}{% else %}{{ item.url }}{% endif %}"
target="_self"
{% if request.path == path %}class="nav-selected nav-path-selected"{% endif %}>
{{ item.title }}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment