Skip to content

Saleor Core: the high performance, composable, headless commerce API.

The featured product section should be hidden if empty

NyanKiyoshif0f70c04afa7
diff --git a/templates/home.html b/templates/home.html
index 7ab9461270..4f524df91f 100644
--- a/templates/home.html
+++ b/templates/home.html
@@ -46,12 +46,14 @@
</div>
</div>
</div>
- <div class="home__featured">
- <h2 class="text-center">{% trans "Featured products" context "Homepage title" %}</h2>
- <div class="row">
- {% include "product/_items.html" %}
+ {% if products %}
+ <div class="home__featured">
+ <h2 class="text-center">{% trans "Featured products" context "Homepage title" %}</h2>
+ <div class="row">
+ {% include "product/_items.html" %}
+ </div>
</div>
- </div>
+ {% endif %}
<script type="application/ld+json">{{ webpage_schema|safe }}</script>
</div>
{% endblock %}