{% load yama %}

<li class="{{ item_li_classes }}">
    <a href="{{ item.link }}" class="{{ item_a_classes }}">{{ item.caption }}</a>
    {% if item.has_visible_children %}
        <ul>
            {% for subitem in item.visible_children %}
                {% menu_item_as_li subitem first=forloop.first last=forloop.last %}
            {% endfor %}
        </ul>
    {% endif %}
</li>
