{{ sylius_template_event('sylius.shop.product.index.before_vertical_menu', {'taxon': taxon}) }}
<!--div class="ui fluid vertical menu" {{ sylius_test_html_attribute('vertical-menu') }}>
{% for child in taxon.enabledChildren %}
<a href="{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}" class="item parent_name_sidebar" {{ sylius_test_html_attribute('vertical-menu-item') }}>{{ child.name }}</a>
{% if taxon.children|length %}
<ul>
{% for child in child.getChildren %}
<li><a href="{{ path('sylius_shop_product_index', {'slug': child.slug, '_locale': child.translation.locale}) }}" class="item" {{ sylius_test_html_attribute('vertical-menu-item') }}>{{ child.getName() }}</a></li>
{% endfor %}
</ul>
{% else %}
<p>No children taxons found.</p>
{% endif %}
{% endfor %}
{% if taxon.parent is not empty and not taxon.parent.isRoot() and taxon.parent.enabled %}
<a href="{{ path('sylius_shop_product_index', {'slug': taxon.parent.slug, '_locale': taxon.parent.translation.locale}) }}" class="item" {{ sylius_test_html_attribute('vertical-menu-go-level-up') }}>
<i class="up arrow icon"></i> {{ 'sylius.ui.go_level_up'|trans }}
</a>
{% else %}
<a class="item parent_name_sidebar" href="{{ path('sylius_shop_homepage') }}taxons/catalogue"><p>{{ 'customStrings.menu.catalogue'|trans }}</p></a>
{% endif %}
</div-->
{{ sylius_template_event('sylius.shop.product.index.after_vertical_menu', {'taxon': taxon}) }}
{% block javascript %}
<script>
$(document).ready(function() {
$(".sidebar-filter .ui.loadable.form").removeClass("loading");
$('input[type=checkbox]').change(function() {
if(this.checked) {
$('#searchbarButtons .labeled.button').trigger('click');
} else {
$('#searchbarButtons .labeled.button').trigger('click');
}
});
handleFilter();
$(window).on('resize', function() {
handleFilter();
});
});
function handleFilter() {
if($(window).width() > 767) {
$('.filtres_class a').removeClass('collapsed');
$('#customDivWrapper').removeClass('collapsed');
$('#customDivWrapper').removeClass('collapse');
$('#customDivWrapper').addClass('show');
}else{
$('.filtres_class a').addClass('collapsed');
$('#customDivWrapper').addClass('collapsed');
$('#customDivWrapper').addClass('collapse');
$('#customDivWrapper').removeClass('show');
}
}
</script>
{% endblock %}