• {% if item.hasChildren() and (options.depth is not same as 0) and item.getDisplayChildren() %} {% for child in item.getChildren() %} {% if child.isDisplayed() %}
    • {% set extras = child.getExtras() %} {% set labelAttributes = child.getLabelAttributes() %} {% set labelClasses = (labelAttributes.class is not defined) ? 'nav-item-name' : labelAttributes.class ~ ' nav-item-name' %} {% if child.hasChildren() and child.getDisplayChildren() %}
      {% if extras.iconClass is defined and extras.iconClass is not empty %} {% endif %} {{ child.getLabel() | trans | purify }}
      {% for grandchild in child.getChildren() %} {% if grandchild.isDisplayed() %}
    • {% set linkAttributes = grandchild.getLinkAttributes() %} {% set extras = grandchild.getExtras() %} {% set url = grandchild.getUri() %} {% set url = (url is empty) ? 'javascript:void(0);' : url %} {% if extras.iconClass is defined and extras.iconClass is not empty %} {% endif %} {{ grandchild.getLabel() | trans | purify }}
    • {% endif %} {% endfor %} {% else %} {% set linkAttributes = child.getLinkAttributes() %} {% set url = child.getUri() %} {% set url = (url is empty) ? 'javascript:void(0);' : url %} {% if extras.iconClass is defined and extras.iconClass is not empty %} {% endif %} {{ child.getLabel() | trans | purify }} {% endif %} {% endif %} {% endfor %} {% endif %}