Back to Flat UI Support

mail31666
mail31666

A small error in the code in nav.htm make that the submenu is not expanding.

The code below is starting at line 45.

{% macro render_menu(links) %}
    {% import _self as nav %} {# this was missing #}

    {% for code, link in links %}
        <li class="{{ code == currentPage ? 'active' }} {{ link.sublinks ? 'dropdown' }}">
            <a
                href="{{ link.sublinks ? '#' : (link.page ?: link[0])|page }}"
                {% if link.sublinks %}data-toggle="dropdown"{% endif %}
                class="{{ link.sublinks ? 'dropdown-toggle' }}"
            >
                {{ link.name ?: link[1] }}
                {% if link.sublinks %}<span class="caret"></span>{% endif %}
            </a>

            {% if link.sublinks %}
                <span class="dropdown-arrow"></span>
                <ul class="dropdown-menu">
                    {{ nav.render_menu(link.sublinks) }} {# this was changed from _self. in nav. #}

                </ul>
            {% endif %}
        </li>
    {% endfor %}
{% endmacro %}

1-1 of 1