---
category:
    products:
        limit: {{theme_settings.categorypage_products_per_page}}
---
{{inject "categoryProductsPerPage" theme_settings.categorypage_products_per_page}}
{{#partial "head"}}
    {{#if pagination.category.previous}}
        <link rel="prev" href="{{{pagination.category.previous}}}">
    {{/if}}
    {{#if pagination.category.next}}
        <link rel="next" href="{{{pagination.category.next}}}">
    {{/if}}
{{/partial}}

{{#partial "page"}}

{{> components/common/breadcrumbs breadcrumbs=breadcrumbs}}
{{#if category.image}}
    {{> components/common/responsive-img
        image=category.image
        fallback_size=theme_settings.zoom_size
        lazyload=theme_settings.lazyload_mode
        class="category-header-image"
    }}
{{/if}}
{{#unless theme_settings.hide_category_page_heading }}
    <h1 class="page-heading">{{category.name}}</h1>
    {{{region name="category_below_header"}}}
{{/unless}}
{{{category.description}}}
<div class="page">
    {{#if category.faceted_search_enabled}}
        <aside class="page-sidebar" id="faceted-search-container">
            {{> components/category/sidebar}}
        </aside>
    {{else if category.subcategories}}
        <aside class="page-sidebar" id="faceted-search-container">
            {{> components/category/sidebar}}
        </aside>
    {{else if theme_settings.shop_by_price_visibility}}
        <aside class="page-sidebar" id="faceted-search-container">
            {{> components/category/sidebar}}
        </aside>
    {{/if}}

    <main class="page-content" id="product-listing-container">
        {{> components/category/product-listing}}
    </main>

    <div class="page-region">
        {{{region name="category_below_content"}}}
    </div>
</div>

{{/partial}}
{{> layout/base}}
