{% macro label(text) %} {{ text }} {% endmacro %} {% macro select(dictName, dict, currentValue) %} {% endmacro %}
{% for part in $switch_text %} {% if loop.index % 2 %} {{ label(part) }} {% else %} {{ select( part, $dictionaries.getDict(part), $variables[part] || $dictionaries.getDefault(part) ) }} {% endif %} {% endfor %}