-
Notifications
You must be signed in to change notification settings - Fork 27
/
category.tpl
147 lines (138 loc) · 7.73 KB
/
category.tpl
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
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
{include file="$tpl_dir./errors.tpl"}
{if !empty($category) && $category->id}
{if !$category->active}
<div class="alert alert-warning">{l s='This category is currently unavailable.'}</div>
{else}
<main>
<section id="category-info">
{if $category->id_image}
<div id="category-banner">
{if !empty($lazy_load)}
<noscript>
<img src="{Link::getGenericImageLink(
'categories',
$category->id_image,
'category_default',
(ImageManager::retinaSupport()) ? '2x' : ''
)|escape:'htmlall':'UTF-8'}"
alt="{$category->name|escape:'html':'UTF-8'}"
title="{$category->name|escape:'html':'UTF-8'}"
width="{getWidthSize|intval type='category_default'}"
height="{getHeightSize|intval type='category_default'}"
class="img-responsive"
>
</noscript>
{/if}
<picture class="img-responsive{if !empty($lazy_load)} tb-lazy-image{/if}">
<!--[if IE 9]><video style="display: none;"><![endif]-->
{if !empty($webp)}
<source {if !empty($lazy_load)}srcset="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII= 1w"
data-{/if}srcset="{Link::getGenericImageLink(
'categories',
$category->id_image,
'category_default',
(ImageManager::retinaSupport()) ? '2x' : ''
)|escape:'htmlall':'UTF-8'}"
title="{$category->name|escape:'html':'UTF-8'}"
type="image/webp"
>
{/if}
<!--[if IE 9]></video><![endif]-->
<img {if !empty($lazy_load)}srcset="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII= 1w"
data-{/if}srcset="{Link::getGenericImageLink(
'categories',
$category->id_image,
'category_default',
(ImageManager::retinaSupport()) ? '2x' : ''
)|escape:'htmlall':'UTF-8'}"
{if !empty($lazy_load)}src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII="{/if}
alt="{$category->name|escape:'html':'UTF-8'}"
title="{$category->name|escape:'html':'UTF-8'}"
width="{getWidthSize|intval type='category_default'}"
height="{getHeightSize|intval type='category_default'}"
class="img-responsive"
>
</picture>
</div>
{/if}
<h1 class="page-heading{if (isset($subcategories) && !$products) || (isset($subcategories) && $products) || !isset($subcategories) && $products} product-listing{/if}">
<span class="cat-name">
{$category->name|escape:'html':'UTF-8'}
{if isset($categoryNameComplement)}
{$categoryNameComplement|escape:'html':'UTF-8'}
{/if}
</span>
</h1>
{if !empty($category->description)}
<div id="category-description" class="rte">{$category->description}</div>
{/if}
</section>
{if !empty($subcategories)
&& ((isset($display_subcategories) && $display_subcategories) || ! isset($display_subcategories))}
<section id="category-subcategories">
<h2 class="page-heading">{$category->name|escape:'html':'UTF-8'} {l s='Subcategories'}</h2>
<ul class="list-grid row">
{foreach from=$subcategories item=subcategory}
<li class="col-xs-6 col-sm-4 col-md-3">
<div class="thumbnail">
{if $subcategory.id_image}
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}"
title="{$subcategory.name|escape:'html':'UTF-8'}">
<img class="replace-2x img-responsive"
src="{Link::getGenericImageLink(
'categories',
$subcategory.id_image,
'medium_default',
(ImageManager::retinaSupport()) ? '2x' : ''
)|escape:'htmlall':'UTF-8'}"
alt="{$subcategory.name|escape:'html':'UTF-8'}"
title="{$subcategory.name|escape:'html':'UTF-8'}"
width="{getWidthSize|intval type='medium_default'}"
height="{getHeightSize|intval type='medium_default'}"
>
</a>
{/if}
<div class="caption">
<h3 class="subcategory-title text-center">
<a href="{$link->getCategoryLink($subcategory.id_category, $subcategory.link_rewrite)|escape:'html':'UTF-8'}">{$subcategory.name|escape:'html':'UTF-8'}</a>
</h3>
</div>
</div>
</li>
{/foreach}
</ul>
</section>
{/if}
{if !empty($products)}
<section id="category-products">
<h2 class="page-heading">
{l s='Products'}
<div class="pull-right">
{include file="$tpl_dir./category-count.tpl"}
</div>
</h2>
<div class="content_sortPagiBar clearfix">
<div class="form-inline sortPagiBar clearfix">
{include file="./product-sort.tpl"}
{include file="./nbr-product-page.tpl"}
</div>
<div class="top-pagination-content form-inline clearfix">
{include file="./product-compare.tpl"}
{include file="$tpl_dir./pagination.tpl"}
</div>
</div>
{include file="./product-list.tpl" products=$products}
<div class="content_sortPagiBar">
<div class="bottom-pagination-content form-inline clearfix">
{include file="./product-compare.tpl" paginationId='bottom'}
{include file="./pagination.tpl" paginationId='bottom'}
</div>
</div>
</section>
{/if}
{if !empty($category->additional_description)}
<div id="category-additional-description" class="rte">{$category->additional_description}</div>
{/if}
{/if}
</main>
{/if}