{% if iSubCatDepth == 1 %} {% set defaultCounter = ( defaultCounter | default(-1) ) + 1 %} {% set iVisibleCategoryCounter = defaultCounter %} {% for subcatkey, oSubCat in aSubCats %} {% if loop.first %}
{% endif %} {% if oSubCat.getIsVisible() %} {# content categories (e.g. from visual cms) before oxcategories #} {% for oCont in oSubCat.getContentCats() %}
{% if iSubCatDepth == 2 %}- {% endif %} {{ oCont.oxcontents__oxtitle.value }}
{% endfor %} {# actual categories (oxcategory) #}
{% apply spaceless %} {% block widget_header_inc_subcategorylist_subcattitle %} {{ oSubCat.oxcategories__oxtitle.value|replace({"<br>": ""})|raw }} {% endblock %} {% endapply %} {% if oSubCat.getSubCats() %} {% include "widget/header/inc/subcategories.html.twig" with {iSubCatDepth: iSubCatDepth+1, aSubCats: oSubCat.getSubCats()} %} {% endif %}
{% endif %} {% if loop.last %}
{% endif %} {% endfor %} {% else %}
{% for thirdsubcatkey, oSubSubCat in oSubCat.getSubCats() %} {% if oSubSubCat.getIsVisible() %} {% for oCont in oSubSubCat.getContentCats() %} {% if iSubCatDepth == 2 %}- {% endif %} {{ oCont.oxcontents__oxtitle.value }} {% endfor %} {% apply spaceless %} {% if iSubCatDepth == 2 %}- {% endif %} {% block widget_header_inc_subcategorylist_subsubcattitle %} {{ oSubSubCat.oxcategories__oxtitle.value|replace({"<br>": "\n"}) }} {% endblock %} {% endapply %} {% endif %} {% endfor %}
{% endif %}