{% macro navItem(template_menu) %}
    {% import _self as nav %}
    {% for link in template_menu %}
        <li>
            <a href="{{ link.template_link }}">
                {{ link.template_name|capitalize }}
            </a>
            {% if link.children is not empty %}
                <ul class="hasChildren">
                    {{ nav.navItem(link.children) }}
                </ul>
            {% endif %}
        </li>
    {% endfor %}
{% endmacro %}
