
{% if not nav_item.children %}
<li>
    <a href="{{ nav_item.url }}">{{ nav_item.title }}</a>
</li>
{% else %}
  <li class="dropdown">
    <a href="#" class="dropdown-toggle" data-toggle="dropdown" role="button" aria-haspopup="true" aria-expanded="false">{{ nav_item.title }}<span class="caret"></span></a>
    <ul class="dropdown-menu">
        {% for nav_item in nav_item.children %}
            {% include "nav.html" %}
        {% endfor %}
    </ul>
  </li>
{% endif %}
