feat: add image alt argument for product_image macros

This commit is contained in:
Shivam Mishra
2020-08-07 14:34:54 +05:30
committed by Ankush Menat
parent b2ae422ed7
commit 063ab520d3

View File

@@ -7,9 +7,9 @@
</div> </div>
{% endmacro %} {% endmacro %}
{% macro product_image(website_image, css_class="") %} {% macro product_image(website_image, css_class="", alt="") %}
<div class="border text-center rounded h-100 {{ css_class }}" style="overflow: hidden;"> <div class="border text-center rounded h-100 {{ css_class }}" style="overflow: hidden;">
<img itemprop="image" class="website-image h-100 w-100" src="{{ frappe.utils.quoted(website_image or 'no-image.jpg') | abs_url }}"> <img itemprop="image" class="website-image h-100 w-100" alt="{{ alt }}" src="{{ frappe.utils.quoted(website_image or 'no-image.jpg') | abs_url }}">
</div> </div>
{% endmacro %} {% endmacro %}