{% spaceless %} {# Parameters: - "column" (integer) (default: 3): Number of columns to divide the items with - "items" (array) (default: []): - "icon" (associate array) (default: { size: 'm' }) - "value" (string) (default: '') - "title" (string) (default: '') - "description" (string) (default:'') - "view_all" (optional) (associative array) (default: {}) - "link" (associative array) { - "label" (string) (default: '') - "path" (string) (default: '') - "display_icons" (boolean) (default: true) - "extra_classes" (string) (default: '') - "extra_attributes" (array) (default: []): format: [ { "name" (string) (default: ''), "value" (string) (default: '') }, ... ], #} {# Parameters #} {% set _css_class = 'ecl-fact-figures' %} {% set _extra_attributes = '' %} {% set _columns = column|default(3) %} {% set _extra_classes = extra_classes|default('') %} {% set _display_icons = display_icons ?? true %} {# Internal logic - Process properties #} {% set _css_class = _css_class ~ ' ecl-fact-figures--col-' ~ _columns %} {% if extra_classes is defined and extra_classes is not empty %} {% set _css_class = _css_class ~ ' ' ~ extra_classes %} {% endif %} {% if extra_attributes is defined and extra_attributes is not empty and extra_attributes is iterable %} {% for attr in extra_attributes %} {% if attr.value is defined %} {% set _extra_attributes = _extra_attributes ~ ' ' ~ attr.name|e('html_attr') ~ '="' ~ attr.value|e('html_attr') ~ '"' %} {% else %} {% set _extra_attributes = _extra_attributes ~ ' ' ~ attr.name|e('html_attr') %} {% endif %} {% endfor %} {% endif %}