{% import _self as local_macros %} {% macro image_marker(el, class, attributes) %} {# extract title #} {% set title = '' %} {% for d in el['data'] %} {% if d['name'] == 'title' %} {% set title = d['value'] %} {% endif %} {% endfor %} {# build style attributes #} {% set styleAttributes = [] %} {% for attribute in attributes %} {% if el[attribute] is defined %} {% set attributePair = attribute ~ ': ' ~ el[attribute] ~ '%' %} {% set styleAttributes = styleAttributes|merge([attributePair]) %} {% endif %} {% endfor %} {% set style = styleAttributes|join('; ') %}
{% endmacro %}