bef-links.html.twig in Better Exposed Filters 8.4
{%
set classes = [
'bef-links',
is_nested ? 'bef-nested'
]
%}
{% set is_nested = true %}
<div{{ attributes.addClass(classes) }}>
{% set current_nesting_level = 0 %}
{% for child in children %}
{% set item = attribute(element, child) %}
{% if child in selected %}
{% set new_nesting_level = attribute(depth, child) %}
{% set item = item|merge({'#attributes': {'class': 'bef-link-active'}}) %}
{% endif %}
{% set new_nesting_level = attribute(depth, child) %}
{% include '@better_exposed_filters/bef-nested-elements.html.twig' %}
{% set current_nesting_level = new_nesting_level %}
{% endfor %}
</div>
File
templates/bef-links.html.twig
View source
- {%
- set classes = [
- 'bef-links',
- is_nested ? 'bef-nested'
- ]
- %}
- {% set is_nested = true %}
- <div{{ attributes.addClass(classes) }}>
- {% set current_nesting_level = 0 %}
- {% for child in children %}
- {% set item = attribute(element, child) %}
- {% if child in selected %}
- {% set new_nesting_level = attribute(depth, child) %}
- {% set item = item|merge({'#attributes': {'class': 'bef-link-active'}}) %}
- {% endif %}
- {% set new_nesting_level = attribute(depth, child) %}
- {% include '@better_exposed_filters/bef-nested-elements.html.twig' %}
- {% set current_nesting_level = new_nesting_level %}
- {% endfor %}
- </div>