{% extends "base.html.twig" %}
{# Page title #}
{% block title %}{{ parent() }} • {{ ('layout.homepage_'~country) |trans }}{% endblock %}
{% block htmlhead %}
<link rel="alternate" hreflang="ar"
href="{{ url(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ar'})) }}"/>
<link rel="alternate" hreflang="en"
href="{{ url(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'en'})) }}"/>
<link rel="alternate" hreflang="x-default"
href="{{ url(app.request.get('_route'), app.request.get('_route_params')|merge({'_locale': 'ar'})) }}"/>
{% endblock %}
{% block body %}
<section class="container filterContainer {{ app.request.get('_route') }}">
<div class="row">
<div class="col-md-12">
<div class="page-header">
<h1>{{ 'layout.sitemap'|trans }}</h1>
</div>
<div class="container">
{% if searchableSections is defined %}
<ul>
{% for searchableSection in searchableSections %}
<li>
<a title="{{ 'layout.title.search_short'|trans({'%property_type%': '','%section%': searchableSection.title}) }}"
href="{{ url('sitemap_section_flow', {section: searchableSection.slug}) }}">
{{ searchableSection.title }}
</a>
</li>
{% endfor %}
</ul>
{% elseif section is defined %}
<h2>
{% if propertyType is defined and propertyType %}
<a href="{{ url('property_type_search', {section_slug: section.slug, property_type_slug: propertyType.slug}) }}">{{ propertyType.title }}</a>
{% endif %}
<a href="{{ url('homepage') }}">{{ section.title }}</a>
</h2>
{% if searchableProperties is defined and not propertyType %}
<ul>
{% for searchableProperty in searchableProperties %}
<li>
<a href="{{ url('sitemap_section_property_type_flow', {section: section.slug, property_type: searchableProperty.propertyTypeSlug}) }}">
{{ searchableProperty.propertyTypeTitle }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if searchableLocations is defined and propertyType %}
<ul class="col-md-12">
{% for searchableLocation in searchableLocations %}
<li class="col-md-4">
<a href="{{ url('sitemap_section_property_type_location_flow', {section: section.slug, property_type: propertyType.slug, location: searchableLocation.locationSlug}) }}">
{{ searchableLocation.locationTitle }}
</a>
</li>
{% endfor %}
</ul>
{% endif %}
{% if parentLocationBuild is defined %}
<ul class="breadcrumb">
{{ parentLocationBuild|raw }}
</ul>
{% endif %}
{% if locationBuild is defined %}
{{ locationBuild|raw }}
{% endif %}
{% endif %}
</div>
</div>
</div>
</section>
{% endblock %}
{% block footer %}
{% include "footer.v2.html.twig" %}
{% endblock %}