</span>
  </button>
  {% endif %}

  <!-- Expanded navigation -->
  <div class="navbar-collapse collapse">
    {% if nav|length>1 %}
    <!-- Main navigation -->
    <ul class="navbar-nav mr-auto">
      {% for nav_item in nav %}
      {% if nav_item.children %}
      <li class="dropdown{% if nav_item.active %} active{% endif %}">
        <a href="#" class="dropdown-toggle" data-toggle="dropdown">{{ nav_item.title }} <b class="caret"></b></a>
        <ul class="dropdown-menu">
          {% for nav_item in n