Fix navbar

This commit is contained in:
itqop 2024-03-18 00:59:39 +03:00
parent ae1731593f
commit 7b18e02c7e
1 changed files with 18 additions and 7 deletions

View File

@ -58,13 +58,24 @@
</button>
<div class="collapse navbar-collapse" id="target-main">
<ul class="navbar-nav justify-content-center w-100 icms-menu-hovered mx-lg-n2 menu-main">
{% for page in page.get_children %}
<li class="nav-item">
<a class="nav-link text-nowrap" href="{{ page.url }}" target="_self">
{{ page.title|safe }}
</a>
</li>
{% endfor %}
{% if page.get_children|length > 0 %}
{% for page in page.get_children %}
<li class="nav-item">
<a class="nav-link text-nowrap" href="{{ page.url }}" target="_self">
{{ page.title|safe }}
</a>
</li>
{% endfor %}
{% else %}
{% for page in page.get_parent.get_children %}
<li class="nav-item">
<a class="nav-link text-nowrap" href="{{ page.url }}" target="_self">
{{ page.title|safe }}
</a>
</li>
{% endfor %}
{% endif %}
</ul>
</div>
</nav>