{% sw_extends '@parent/storefront/element/cms-element-oo-categorybox-2.html.twig' %}
{% block element_oo_categoryhighlight %}
<div class="oo-category-highlight">
{#{% for i in 1..3 %}#}
{% set i = 1 %}
{% set img_id = element.config['cat' ~ i ~ 'image'].value %}
{% set cat_id = element.config['cat' ~ i ~ 'category'].value %}
{% set alt_text = element.config['cat' ~ i ~ 'text'].value %}
{% set alt_url = element.config['cat' ~ i ~ 'url'].value %}
{% set media = img_id ? searchMedia([img_id], context.context) : '' %}
{% set category = page.cmsPage.extensions.categories.elements[cat_id] %}
{% block element_oo_categoryhighlight_item %}
<a {% if category %}href="{{ alt_url ? alt_url : seoUrl('frontend.navigation.page', { navigationId: category.id }) }}{% endif %}" class="col-12 d-flex flex-row justify-content-between mr-2 p-0 oo-category-highlight-item">
<div class="oo-cat-image mt-auto mb-auto mr-2" style="">
{% if media %}
{% sw_thumbnails 'sibling-cover-thumbnails' with {
media: media.first(),
sizes: {
'default': '75px'
},
attributes: {
'style': 'width:100%;',
'alt': (category.translated.name ?: category.translated.name),
}
} %}
{% endif %}
</div>
<div class="oo-cat-name pl-4 pr-4 m-md-auto">
{{ alt_text ? alt_text : (category.translated.name ?: category.translated.name) }}
</div>
</a>
{% endblock %}
{#{% endfor %}#}
</div>
{% endblock %}