Skip to content
Snippets Groups Projects

Issue #3497493 by pdureau, grimreaper: Clean variant logic in templates

21 files
+ 44
45
Compare changes
  • Side-by-side
  • Inline
Files
21
{% if variant and variant|lower != 'default' %}
{% set attributes = attributes.addClass('accordion-' ~ variant|lower|replace({'_': '-'})) %}
{% if variant and variant != 'default' %}
{% set attributes = attributes.addClass('accordion-' ~ variant) %}
{% endif %}
{% set accordion_id = accordion_id|default("accordion-" ~ random()) %}
{% set keep_open = keep_open ? 'true' : 'false' %}
Loading