forked from PrestaShop/hummingbird
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcategory-header.tpl
More file actions
42 lines (37 loc) · 1.61 KB
/
category-header.tpl
File metadata and controls
42 lines (37 loc) · 1.61 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
{**
* For the full copyright and license information, please view the LICENSE
* file that was distributed with this source code.
*}
<div id="js-product-list-header">
{if $listing.pagination.items_shown_from == 1}
<div class="category__header">
{include file='components/page-title-section.tpl' title=$category.name}
{if $category.description}
<div class="category__description rich-text">{$category.description nofilter}</div>
{/if}
{if !empty($category.cover.bySize.category_cover.url)}
<div class="category__cover">
<picture>
{if isset($category.cover.bySize.category_cover.sources.avif)}
<source srcset="{$category.cover.bySize.category_cover.sources.avif}" type="image/avif">
{/if}
{if isset($category.cover.bySize.category_cover.sources.webp)}
<source srcset="{$category.cover.bySize.category_cover.sources.webp}" type="image/webp">
{/if}
<img
class="category__cover-image img-fluid"
src="{$category.cover.bySize.category_cover.url}"
width="{$category.cover.bySize.category_cover.width}"
height="{$category.cover.bySize.category_cover.height}"
alt="{if !empty($category.cover.legend)}{$category.cover.legend}{else}{$category.name}{/if}"
fetchpriority="high"
>
</picture>
</div>
{/if}
{if isset($subcategories) && $subcategories|@count > 0}
{include file='catalog/_partials/subcategories.tpl' subcategories=$subcategories}
{/if}
</div>
{/if}
</div>