{# Map Accordion Content Shows discovered locations grouped by region #} {% if discovered_locations %} {# Group locations by region #} {% set regions = {} %} {% for loc in discovered_locations %} {% set region = loc.region %} {% if region not in regions %} {% set _ = regions.update({region: []}) %} {% endif %} {% set _ = regions[region].append(loc) %} {% endfor %} {% for region_name, locations in regions.items() %}