You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
27 lines
1.4 KiB
27 lines
1.4 KiB
{% load cms_tags %}
|
|
|
|
{% for child in children %}
|
|
<li class="{% if child.selected %}selected{% elif child.ancestor %}ancestor{% elif child.sibling %}sibling{% elif child.descendant %}descendant{% endif %} level-{{ child.level }}">
|
|
{% if child.selected %}
|
|
<span>{{ child.get_menu_title }}</span>
|
|
{% else %}
|
|
<a href="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.get_host }}{{ child.get_absolute_url }}">{{ child.get_menu_title }}</a>
|
|
{% endif %}
|
|
|
|
{% if child.selected or child.ancestor %} {# подменю #}
|
|
{% if child.children %}
|
|
<ul class="menu-left-submenu">
|
|
{% for subchild in child.children %}
|
|
<li class="{% if forloop.first %}first{% elif forloop.last %}last{% endif %}">
|
|
{% if subchild.selected %}
|
|
<span>{{ subchild.get_menu_title }}</span>
|
|
{% else %}
|
|
<a href="{% if request.is_secure %}https{% else %}http{% endif %}://{{ request.get_host }}{{ subchild.get_absolute_url }}">{{ subchild.get_menu_title }}</a>
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
</ul>
|
|
{% endif %}
|
|
{% endif %}
|
|
</li>
|
|
{% endfor %}
|
|
|