Fix category links across locales
This commit is contained in:
@@ -1,16 +1,17 @@
|
||||
{% load i18n ocyan_thumbnail %}
|
||||
{% load i18n ocyan_thumbnail mandelstudio_i18n %}
|
||||
{% if menu_items %}
|
||||
{% for menu_item in menu_items %}
|
||||
{% with category_icon=menu_item.category.icons.first %}
|
||||
{% with category_url=menu_item.get_absolute_url|language_neutral_path %}
|
||||
{% if menu_item.has_children %}
|
||||
<li class="nav-item has_children">
|
||||
<a class="nav-link category-label" data-name="{{ menu_item.name|safe }}" data-href="{{ menu_item.get_absolute_url }}" tabindex="-1">
|
||||
<a class="nav-link category-label" data-name="{{ menu_item.name|safe }}" data-href="{{ category_url }}" tabindex="-1">
|
||||
<span>{% trans "Show everything in" %}</span>{{ menu_item.name }}
|
||||
</a>
|
||||
<ul class="menu-level">
|
||||
{% else %}
|
||||
<li class="nav-item child">
|
||||
<a class="nav-link child-category" href="{{ menu_item.get_absolute_url }}" tabindex="-1">
|
||||
<a class="nav-link child-category" href="{{ category_url }}" tabindex="-1">
|
||||
{{ menu_item.name }}
|
||||
</a>
|
||||
</li>
|
||||
@@ -20,5 +21,6 @@
|
||||
</li>
|
||||
{% endfor %}
|
||||
{% endwith %}
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
Reference in New Issue
Block a user