<div class="clearfix">
<div class="page-header">
<h3>
{% if location is defined and location %}
{% if section is not defined or propertyType is not defined %}
{{ 'listing.subs_location_links'|trans({'%location%': location.title}) }}
{% else %}
{{ 'listing.subs_locations_links'|trans({'%location%': location.title, '%property_type%': propertyType ? propertyType.title: null, '%section%': section ? section.title: ''}) }}
{% endif %}
{% else %}
{% if get_setting('general', 'country') == 'EG' %}
{{ 'listing.search_inside_cities_eg'|trans }}
{% elseif get_setting('general', 'country') == 'SA' %}
{{ 'listing.search_inside_cities_sa'|trans }}
{% endif %}
{% endif %}
</h3>
</div>
{% if subLinksSections is defined %}
<ul class="nav nav-pills">
{% for section in subLinksSections %}
<li>
<a data-toggle="pill" href="#sectionLinks{{ loop.index }}" {{ loop.first == true ? ' class="active"' : '' }}>{{ section.title }}</a>
</li>
{% endfor %}
</ul>
{% endif %}
<div class="tab-content">
{% if location is defined and location and app.request.attributes.get('_route') in ["compound_search", "neighborhood_discussion_list", "neighborhood_all_locations", "neighborhood_main_page", "compound_search_with_location"] %}
{% include "@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig" %}
{% else %}
{% if subLinksSections is defined %}
{% include "@AqarmapMainBundle/Default/locationSectionIndexedSubLinks.html.twig" %}
{% elseif section is defined %}
<div id='sectionLinks' class="tab-pane active">
<div id="moreLocationsContainer" class="subsLinks sectionLoadMore">
{% set sub_locations_links = knp_menu_get( 'aqarmap.subLocations_search.menus' ,[], {'attributes': {'id': 'sud-locations-links', 'section': section}}) %}
{% if sub_locations_links.children %}
<div class="clearfix">
{{ knp_menu_render(sub_locations_links, {'template': '@AqarmapListingBundle/ListingSearch/subLinksTemplate.html.twig'}) }}
</div>
{% endif %}
</div>
</div>
{% endif %}
{% endif %}
</div>
</div>