Skip to content

Commit

Permalink
Use category thumbnail
Browse files Browse the repository at this point in the history
  • Loading branch information
Hlavtox authored Sep 16, 2024
1 parent ad3f1ae commit 60fcfee
Showing 1 changed file with 13 additions and 4 deletions.
17 changes: 13 additions & 4 deletions templates/catalog/_partials/subcategories.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,21 @@
<div class="subcategory__wrapper col-6 col-lg-4 col-xl-3">
<a class="subcategory" href="{$subcategory.url}" title="{$subcategory.name|escape:'html':'UTF-8'}">
<div class="subcategory__image">
{if !empty($subcategory.image.small.url)}
{if !empty($subcategory.thumbnail.small.url)}
<img
class="img-fluid"
src="{$subcategory.image.small.url}"
width="{$subcategory.image.small.width}"
height="{$subcategory.image.small.height}"
src="{$subcategory.thumbnail.small.url}"
width="{$subcategory.thumbnail.small.width}"
height="{$subcategory.thumbnail.small.height}"
alt="{$subcategory.name|escape:'html':'UTF-8'}"
loading="lazy"
>
{else}
<img
class="img-fluid"
src="{$urls.no_picture_image.small.url}"
width="{$urls.no_picture_image.small.width}"
height="{$urls.no_picture_image.small.height}"
alt="{$subcategory.name|escape:'html':'UTF-8'}"
loading="lazy"
>
Expand Down

0 comments on commit 60fcfee

Please sign in to comment.