Skip to content
Snippets Groups Projects

Fix #3347943: Better variants to HTML class conversions

Merged Fix #3347943: Better variants to HTML class conversions
All threads resolved!
All threads resolved!
16 files
+ 41
68
Compare changes
  • Side-by-side
  • Inline
Files
16
{% if variant != '' and variant|lower != 'default' %}
{% if variant and variant|lower != 'default' %}
{% set variants = variant|split('__') %}
{% set attributes = attributes.addClass('accordion-' ~ variant|lower|replace({'_': '-'})) %}
{% for variant in variants %}
{% set attributes = attributes.addClass('accordion-' ~ variant|lower|replace({'_': '-'})) %}
{% endfor %}
{% endif %}
{% endif %}
{% set attributes = attributes.addClass('accordion') %}
{% set attributes = attributes.addClass('accordion') %}
{% set attributes = accordion_id ? attributes.setAttribute('id', accordion_id) : attributes %}
{% set attributes = accordion_id ? attributes.setAttribute('id', accordion_id) : attributes %}
Loading