{% for child in children %}
    <li class="{% if child.children %}
                    {{ menu_item_class|default:"dropdown" }}
               {% endif %}
               {% if child.selected or child.ancestor %}
                    active
               {% endif %}">
        <a
                href="{{ child.get_absolute_url }}"
                {% if child.children %}
                        class="dropdown-toggle"
                        data-toggle="dropdown"
                {% endif %}
        >
            {{ child.get_menu_title }}
            {% if child.children %}
                <span class="caret"></span>
            {% endif %}
        </a>
        {% if child.children %}
            <ul class="dropdown-menu">
                {% include "cms_qe/menu/menu_items.html" with children=child.children menu_item_class="dropdown-submenu" only %}
            </ul>
        {% endif %}
    </li>
{% endfor %}