<!-- Sidebar Menu -->
<nav class="mt-2">
<ul class="nav nav-pills nav-sidebar flex-column" data-widget="treeview" role="menu" data-accordion="false">
<!-- Add icons to the links using the .nav-icon class
with font-awesome or any other icon font library -->
{% for menu in app.session.get('menu') %}
<li {% if menu.submenu != false %} id="{{ menu.idMenu }}" {% endif %} class="nav-item">
<a {% if menu.submenu == false %} id="{{ menu.idMenu }}" {% endif %} href="{% if menu.ruta == "#" %}{{ menu.ruta }}{% else %}{{ path(menu.ruta) }}{% endif %}" class="nav-link">
<i class="nav-icon fa {{ menu.icono }}"></i>
<p>
{{ menu.menu }}
{% if menu.submenu != false %}
<i class="right fa fa-angle-left"></i>
{% endif %}
</p>
</a>
{% if menu.submenu != false %}
<ul class="nav nav-treeview">
{% for submenu in menu.submenu %}
<li class="nav-item">
<a id="{{ submenu.idMenu }}" href="{{ path(submenu.ruta) }}" class="nav-link">
<i class="fa fa-angle-right nav-icon"></i>
<p>{{ submenu.menu }}</p>
</a>
</li>
{% endfor %}
</ul>
{% endif %}
</li>
{% endfor %}
</ul>
</nav>
<!-- /.sidebar-menu -->