You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{# Category names might contain indices for sorting. Tidy them up #}
235
235
{% set filter_categories = [] %}
236
236
{% for category in categories|map(attribute=0)|list %}
237
-
{% set category = (category.split('.')[1] if category and category.split('.')|length == 2 else category)|slug %}
237
+
{% set category = (category.split('.')[1] if category and category.split('.')|length == 2 else category)|custom_slug %}
238
238
{% do filter_categories.append(category) %}
239
239
{% endfor %}
240
240
{% set filter_categories = filter_categories|tojson %}
@@ -245,7 +245,7 @@ <h2>{{ _('Filter by category') }}</h2>
245
245
{% for category, documents in categories %}
246
246
{% set category_name = category.split('.')[1] if category and category.split('.')|length == 2 else category %}
247
247
248
-
[% if not {{ filter_categories }}.includes(category) or {{ filter_categories }}.includes(category) and category == '{{ category_name|slug }}' %]
248
+
[% if not {{ filter_categories }}.includes(category) or {{ filter_categories }}.includes(category) and category == '{{ category_name|custom_slug }}' %]
249
249
[% if format in {{ documents|map(attribute='formats')|sum(start=[])|unique|list|tojson }} %]
0 commit comments