{{ $locations := .locations }} {{ $popup_opened := .popup_opened | default false }}
{{ range $locations }} {{ if and .Params.contact_details.geolocation.longitude .Params.contact_details.geolocation.latitude }}
{{ $title := "" }} {{ if .Params.title }}
{{ $title = partial "PrepareHTML" .Params.title -}}

{{- if and .Params.url .Params.with_link }} {{ end -}} {{- $title -}} {{- if and .Params.url .Params.with_link }} - {{ safeHTML (i18n "commons.link.blank") }} {{ end -}}

{{ with .Params.contact_details }} {{ .address.value }} {{ .zipcode.value }} {{ .city.value }} {{ end }}
{{ end -}} {{- if .Params.image -}}
{{- partial "commons/image.html" (dict "image" .Params.image "alt" $title "sizes" site.Params.image_sizes.sections.locations.map ) -}}
{{- end -}}
{{ end }} {{ end }}