test
This commit is contained in:
18
djpro/templates/menu.html
Normal file
18
djpro/templates/menu.html
Normal file
@@ -0,0 +1,18 @@
|
||||
{% load menu_tags %}
|
||||
|
||||
<ul>
|
||||
{% for item in menu_items %}
|
||||
{% if not item.parent or item.id in item.parent.children.all %}
|
||||
<li{% if current_url == item.url %} class="active"{% endif %}>
|
||||
<a href="{% if item.url %}{{ item.url }}{% else %}#{% endif %}">{{ item.title }}</a>
|
||||
{% if item.children %}
|
||||
<ul>
|
||||
{% for child in item.children.all %}
|
||||
<li><a href="{{ child.url }}">{{ child.title }}</a></li>
|
||||
{% endfor %}
|
||||
</ul>
|
||||
{% endif %}
|
||||
</li>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</ul>
|
||||
Reference in New Issue
Block a user