# V2_Navigation

    {% set navigation = module('V2_Navigation', '') %}

    {% macro renderNavigation(navigation) %}
    <ul>
      {% for item in navigation %}
      <li {{ item.attr|safe_html }} data-depth="c_{{ item.depth }}" >
        <a href="{{ item.url }}" {{ item.attr2|safe_html }} target="{{ item.target }}">{{ item.label }}</a>
        {% if item.children is defined %}
          {{ _self.renderNavigation(item.children) }}
        {% endif %}
      </li>
      {% endfor %}
    </ul>
    {% endmacro %}

    <div>
      {{ include('/admin/module/setting.twig', { moduleInfo: navigation.moduleInfo }) }}
      <nav class="acms-navbar acms-margin-bottom-medium clearfix">
        {{ _self.renderNavigation(navigation.items) }}
      </nav>
    </div>