{% if not sListType %} {% set sListType = "grid" %} {% endif %} {% if not iArticlesPerLine %} {% set iArticlesPerLine = 4 %} {% endif %} {% if sListType == "grid" or sListType == "slider" %} {% set iArticlesPerLine = 4 %} {% elseif sListType == "infogrid" %} {% set iArticlesPerLine = 2 %} {% elseif sListType == "line" %} {% set iArticlesPerLine = 1 %} {% endif %}
{% block widget_product_list_header %} {% if sHead %}

{{ sHead }}

{% if sSubhead %}
{{ sSubhead }}
{% endif %}
{% endif %} {% endblock %} {% set iArticlesCount = 0 %} {% if not empty(oArticles) %} {% set iArticlesCount = oArticles|length %} {% endif %} {% block widget_product_list_content %} {% if iArticlesCount > 0 %} {% set iColIdent = 12/iArticlesPerLine %}
{% for oArticle in oArticles %} {% set defaultCounter = ( defaultCounter | default(0) ) + 1 %} {% set iArticleListCounter = defaultCounter %} {% set iIndex = loop.index %} {# open standard list rows #} {% if sListType != "slider" and iArticleListCounter == 1 %}
{% endif %} {# open slider rows #} {% if sListType == "slider" and iArticleListCounter == 1 %}
{% endif %} {# article list item #} {{ include_widget({ cl: "oxwArticleBox", _parent: oView.getClassKey(), nocookie: 1, _navurlparams: oViewConf.getNavUrlParams(), iLinkType: oArticle.getLinkType(), _object: oArticle, anid: oArticle.getId(), sWidgetType: "product", sListType: 'listitem_' ~ sListType, iIndex: iIndex, blDisableToCart: blDisableToCart, isVatIncluded: oView.isVatIncluded(), showMainLink: blShowMainLink, recommid: recommid, owishid: owishid, toBasketFunction: toBasketFunction, removeFunction: removeFunction, inlist: oArticle.isInList(), skipESIforUser: 1, iColIdent: iColIdent, sListId: sListId }) }} {# close slider rows #} {% if sListType == "slider" and iArticlesCount == iArticleListCounter %}
{% endif %} {# close standard list rows #} {% if sListType != "slider" and (iArticleListCounter % iArticlesPerLine == 0 or iArticlesCount == iArticleListCounter) %}
{% endif %} {% if sListType != "slider" and (iArticleListCounter % iArticlesPerLine == 0 and iArticlesCount > iArticleListCounter) %}
{% endif %} {% endfor %} {# counter resetten #} {% set defaultCounter = ( defaultCounter | default(-1) ) + 1 %} {% set iArticleListCounter = defaultCounter %}
{% endif %} {% endblock %}