{% spaceless %} {# /** * @file * Theme implementation for a ECL Link Block. */ Parameters: - "title" (string) (default: ''): optional title of the link block - "links" (array) (default: []): collection of standalone @ecl-twig/link - "extra_classes" (string) (default: '') - "extra_attributes" (array) (default: []): format: [ { "name" (string) (default: ''), "value" (string) (default: '') }, ... ] #} {# Internal properties #} {% set _title = title|default('') %} {% set _links = links|default([]) %} {% set _css_class = 'ecl-link-block' %} {% set _extra_attributes = '' %} {# Internal logic - Process properties #} {% 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 %} {% set _extra_attributes = _extra_attributes ~ ' ' ~ attr.name ~ '="' ~ attr.value ~ '"' %} {% endfor %} {% endif %}