{% set place_context = entity_contexts['place'] %}
{% set featured = featured | default(True) %}
{% set places = places | default(entities) | select('public') | list %}
{% set ns = namespace(places_and_names=[]) %}
{% for place in places %}
    {% do ns.places_and_names.append((place, place.label | localize)) %}
{% endfor %}
{% set places = ns.places_and_names | sort(attribute=1) | map(attribute=0) | list %}
<div class="places{% if 'maps' in project.extensions %} with-map{% endif %}">
    {% if 'maps' in project.extensions and places | rejectattr('coordinates', 'none') | list | length > 0 %}
        {% include 'map.html.j2' %}
    {% endif %}
    <ul class="entities{% if hide_list | default(false) %} visually-hidden{% endif %}{% if map_hides_list | default(false) %} js-visually-hidden{% endif %}">
        {% for place in places %}
            <li class="{{ loop.cycle('odd', 'even') }}" data-betty-place="{{ place | localized_url(media_type='application/json') }}">
                {% include 'entity/label--place.html.j2' %}
                {% include 'entity/meta--place.html.j2' %}
            </li>
        {% endfor %}
    </ul>
</div>
