{% load i18n menu_tags cache %} {% for child in children %} {{ child.get_menu_title }} {% if class and forloop.last and not forloop.parentloop %}{% endif %} {% endfor %}