{% if article.related_products.size > 0 %} <div class="related_products"> <div class="related_products-title"> Товары к статье </div> </div> {% for product in article.related_products %} <div class="card"> <a href="{{ product.url }}" class="card-preview"> <img src="{{ product.first_image.medium_url }}" alt="" class="card-img"> <span class="card-title"> {{ product.title }} </span> </a> </div> {% endfor %}{% endif %}
Включите в вашем браузере JavaScript!