{% extends 'base.jinja' %} {% from '_helpers.jinja' import render_pagination, render_product_list %} {% block title %}{{ node.name }} {{ super() }}{% endblock %} {% block meta_description %}{{ (node.description or '')|striptags|truncate(300) }}{% endblock %} {% block breadcrumb %} {{ super() }} {% for url, node in make_tree_crumbs(node=node, add_home=False)[1:] %}
  • {% endfor %} {% endblock breadcrumb %} {% block main %}

    {{ node.name }}

    {% if node.description %}
    {{ node.description|safe }}
    {% endif %}
    {% if node.children %}
    {% for child in node.children %} {% endfor %}
    {% endif %}

    ItemsTotal Products: {{ products.count }}

    {% for product in products %} {{ render_product_list(product) }} {% endfor %}
    {{ render_pagination(products, endpoint='product.tree_node.render', active_id=node.id, slug=node.slug) }}
    {% endblock main%} {% block ga_page_view %} // 1. Send product and impression data with pageview. {% for product in products %} {% if product.__name__ == 'product.template' %} {# the product could also template, in which case use the first variant #} {% set product = product.products_displayed_on_eshop[0] %} {% endif %} ga('ec:addImpression', {{ product.ga_product_data(list=node.name, position=loop.index)|tojson|safe }}); {% endfor %} {% endblock ga_page_view %}