{% set supported_core_templates = [] %} {% set supported_custom_templates = [] %} {% for template in data.templates if slot_type in template.supported_slot_types %} {% if template.is_core %} {% set supported_core_templates = supported_core_templates|merge([template]) %} {% else %} {% set supported_custom_templates = supported_custom_templates|merge([template]) %} {% endif %} {% endfor %} {% set total_templates = (supported_core_templates|length) + (supported_custom_templates|length)%}