{% from "__macros__/bootstrap/dropdown.html" import bs_nav_dropdown, bs_dropdown_divider, bs_dropdown_item %} {% from "__macros__/bootstrap/ui.html" import ico %} {% macro bs_menu_item(item) -%} {% if item.is_visible() %} {% set active = "active" if item.is_current() else "" %} {% if item.childs %} {% call bs_nav_dropdown(item.name) %} {% for child in item.childs %} {% if item.name == "--" %} {{ bs_dropdown_divider() }} {% else %} {{ bs_dropdown_item(url_for(item.view) if item.view else '#', item.label, active) }} {% endif %} {% endfor %} {% endcall %} {% elif not item.separator %}