
{% for child in parent.categories %}
<li class="primary"> 
        {% if child.categories %}
                <a href="/cms{{child.path}}" class="firstLevel">{{child.title}}</a>
                <ul class="subMenu">
                {% for gchild in child.categories %}
                    {% if gchild.categories %} 
                    <li class="submenu">
                        <a href="/cms{{gchild.path}}" class="hasSubMenu">{{gchild.title}}</a>
                            <ul>
                             {%for ggchild in gchild.categories %}
                                <li><a href="/cms{{ggchild.path}}">{{ggchild.title}}</a></li>
                            {%endfor%}
                            </ul>
                    </li>
                    {% else %}
                    <li><a href="/cms{{gchild.path}}">{{gchild.title}}</a></li>
                    {% endif %}
                
                 {%endfor%}
                </ul>
        {% else %}
                <a href="/cms{{child.path}}" class="firstLevel">{{child.title}}</a>  
        {% endif %}
</li>
{%endfor%}
                
        
                                            