symposion_app/pinaxcon/templates/sitetree_header.html
2018-06-04 20:54:51 +12:00

26 lines
No EOL
1.1 KiB
HTML

{% load sitetree %}
<div class="collapse navbar-collapse" id="navbarNavDropdown">
<ul class="navbar-nav ml-auto">
{% for item in sitetree_items %}
{% if not forloop.first %}
{% if item.has_children %}
<li class="nav-item mx-3 dropdown {% if item.is_current or item.in_current_branch %}active{% endif %}">
<a class="nav-link dropdown-toggle" href="#" data-toggle="dropdown" aria-haspopup="true" aria-expanded="false">
{{ item.title_resolved }} {% if item.is_current or item.in_current_branch %}<span class="sr-only">(current)</span>{% endif %}
</a>
<div class="dropdown-menu">
{% sitetree_children of item for menu template "sitetree_children.html" %}
</div>
</li>
{% else %}
<li class="nav-item mx-3 {% if item.has_children %}dropdown}{% endif %} {% if item.is_current or item.in_current_branch %}active{% endif %}">
<a class="nav-link" href="{% sitetree_url for item %}">
{{ item.title_resolved }} {% if item.is_current or item.in_current_branch %}<span class="sr-only">(current)</span>{% endif %}
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}
</ul>
</div>