This commit is contained in:
2024-04-12 10:12:56 +03:00
commit 049f11f557
26 changed files with 608 additions and 0 deletions

18
djpro/templates/menu.html Normal file
View 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>