{% extends "base.html.twig" %}
{% set SHARING_IMAGE = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\SharingConstant::PROJECTS_IMAGE') %}
{% set isCtaButtonsEnabled = isEnabledFeature('web.compound.card.cta') %}
{% set totalListingsCount = listings.getTotalItemCount() %}
{% set SHOW_PHONE_CONSTANT = constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\LeadTypes::SHOW_PHONE') %}
{% set isKSASite = get_setting('general', 'country') == 'SA' %}
{% if location.parent is defined and location.parent %}
{% set resortsCustomTitleWithLocation = 'layout.resorts_custom_title_with_location_with_parent'|trans({
'%location%': locationTitle,
'%parentLocation%': location.parent.title,
'%projects%': totalListingsCount
}) %}
{% if isKSASite %}
{% set projectsCustomTitleWithLocation = 'layout.projects_ksa_custom_title_with_location_with_parent'|trans({
'%location%': locationTitle,
'%parentLocation%': location.parent.title,
'%projects%': totalListingsCount
}) %}
{% else %}
{% set projectsCustomTitleWithLocation = 'layout.projects_custom_title_with_location_with_parent'|trans({
'%location%': locationTitle,
'%parentLocation%': location.parent.title,
'%projects%': totalListingsCount
}) %}
{% endif %}
{% else %}
{% set resortsCustomTitleWithLocation = 'layout.resorts_custom_title_with_location'|trans({
'%location%': locationTitle,
'%projects%': totalListingsCount
}) %}
{% if isKSASite %}
{% set projectsCustomTitleWithLocation = 'layout.projects_ksa_custom_title_with_location'|trans({
'%location%': locationTitle,
'%projects%': totalListingsCount
}) %}
{% else %}
{% set projectsCustomTitleWithLocation = 'layout.projects_custom_title_with_location'|trans({
'%location%': locationTitle,
'%projects%': totalListingsCount
}) %}
{% endif %}
{% endif %}
{% set projectsCustomDescriptionWithLocation = 'layout.projects_custom_description_with_location'|trans({
'%location%': locationTitle,
'%projects%': totalListingsCount
}) %}
{% set ogDescription = locationTitle ? projectsCustomDescriptionWithLocation : 'listing.compound_guide.sharing.description'|trans %}
{% set projectsTitleWithoutLocation = isKSASite ? 'layout.ksa_compounds_title' | trans : 'layout.compounds_title_without_location' |trans({'%projects%': totalListingsCount}) %}
{# Page title #}
{% block title %}
{% if locationTitle %}
{% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
{{ resortsCustomTitleWithLocation }}
{% else %}
{{ projectsCustomTitleWithLocation }}
{% endif %}
{% else %}
{{ projectsTitleWithoutLocation }}
{% endif %}
{{ parent() }}
{% endblock %}
{% block metatags %}
{% if isNoIndexMetaTag or not listingsCount %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
{% block meta_description %}
{% if locationTitle %}
{{ projectsCustomDescriptionWithLocation }}
{% elseif customParagraph %}
{{ customParagraph.paragraph|striptags|truncate(160) }}
{% endif %}
{% endblock %}
{% block categorizedStylesheets %}
{% if isMobile %}
<style type="text/css">
{{ source('@AqarmapListing/style/compoundSearchCritical.css', ignore_missing = true) }}
</style>
{% else %}
<link rel="stylesheet" href="{{ asset('builds/css/compoundsBuild'~ (app.environment == 'dev' ? '' : '.min') ~'.css') }}" />
{% endif %}
<meta name="twitter:card" content="summary_large_image" />
<meta name="twitter:site" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
<meta name="twitter:creator" content="{{ "%s%s"|format('@', 'layout.app_name'|trans) }}" />
{% if locationTitle %}
{% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
<meta property="og:title" content="{{ resortsCustomTitleWithLocation }}{{ 'layout.brand_suffix'|trans }}"/>
{% else %}
<meta property="og:title" content="{{ projectsCustomTitleWithLocation }}{{ 'layout.brand_suffix'|trans }}"/>
{% endif %}
{% else %}
<meta property="og:title" content="{{ projectsTitleWithoutLocation }}{{ 'layout.brand_suffix'|trans }}"/>
{% endif %}
<meta property="og:description" content="{{ ogDescription }}" />
<meta property="og:image" content="{{ SHARING_IMAGE }}" />
<meta property="og:site_name" content="{{ 'layout.app_name'|trans }}" />
<meta property="fb:app_id" content="{{ facebook_app_id }}"/>
{% endblock %}
{% block headerTop %}
{% endblock %}
{% block body %}
{% set sharingEvent = "compounds-guide" %}
<div class="filter-fixed-height">
<div class="stick-filter-box">
<div class="compoundSearchContainer filterSearchContainer visible-sm visible-xs">
<div class="sectionContainer">
<button class="btnTop" onclick="openCompoundsFilter('searchFormContainer')" alt="searchFilters">
<div class="bs-custom-caret">
<span class="caret"></span>
</div>
{{ 'layout.more_filter'|trans }}
</button>
<div class="btnTop sortContainer">
<div class="bs-custom-caret">
<span class="caret"></span>
</div>
<div class="d-flex justify-content-center w-100">
<div class="sortSelect">
{% include "@AqarmapListing/CompoundSearch/sortSelect.html.twig" with {'location': location} %}
</div>
</div>
</div>
</div>
</div>
</div>
</div>
{% include "adsHeader.html.twig" %}
<section class="container sectionsContainer compoundPlannerContainer">
<div class="row">
<div class="col-lg-10 col-md-10 col-sm-10 col-xs-12 hidden-xs">
{% set compound_search_breadcrumb = knp_menu_get( 'compound_search.breadcrumb' , [], {}) %}
{{ knp_menu_render(compound_search_breadcrumb, {
'allow_safe_labels': true,
'template': 'knp_breadcrumbs.html.twig',
'currentAsLink': true,
'currentClass': 'active'
}) }}
</div>
<div class="sortBy col-lg-2 col-md-2 col-sm-2 col-xs-12 hidden-sm hidden-xs">
<div class="sortContainer">
<div class="sortSelect">
{% include "@AqarmapListing/CompoundSearch/sortSelect.html.twig" with {'location': location} %}
</div>
</div>
</div>
<div class="page-header d-flex justify-content-between align-items-md-center flex-md-row flex-column col-12">
<h1>
{% if locationTitle %}
{% if locationType == constant('Aqarmap\\Bundle\\ListingBundle\\Constant\\CompoundType::RESORT') %}
{{ resortsCustomTitleWithLocation }}
{% else %}
{{ projectsCustomTitleWithLocation }}
{% endif %}
{% else %}
{{ projectsTitleWithoutLocation }}
{% endif %}
</h1>
{% if isEnabledFeature('web.compound.advisor') %}
<a href="{{ path('compound_adviser') }}" class="compound-searching-links__btn font-weight-bold mt-md-0 mt-3" alt="compounds">{{ 'listing.compounds_adviser.sub_title'|trans }}</a>
{% endif %}
</div>
<div class="col-12 hidden-page-header">
{% include "@AqarmapListing/Section/compoundsSubLinks.html.twig" %}
</div>
<div class="col-lg-3 col-md-3 col-sm-12 col-xs-12">
{% include '@AqarmapListingBundle/CompoundSearch/compoundSearchForm.html.twig' %}
{% if isEnabledFeature('web.sharing.page') %}
<div class="side-sub-links hidden-xs hidden-sm">
<div class="listing-share-box">
<label class="share-header-mob">
{{ isEgyptSite ? 'labels.compound.share_title' | trans : 'labels.compound.ksa_share_title' | trans }}
</label>
{% include '@AqarmapListingBundle/Listing/elementShareContent.html.twig' with {'url': app.request.uri} %}
</div>
</div>
{% endif %}
</div>
{#Listings Cards#}
<div class="listingCardContainer p-0 col-lg-9 col-md-9 col-sm-12 col-xs-12">
{% set neighborhoodLocation = null %}
{% if firstRootLocation %}
{% set neighborhoodLocation = firstRootLocation %}
{% elseif location and location.location %}
{% set neighborhoodLocation = location.location %}
{% endif %}
{% include '@AqarmapListingBundle/CompoundSearch/compoundResultsContainer.html.twig' %}
{% if isKSASite %}
{% set joinNowPath = path('contact_us_page') %}
{% else %}
{% set joinNowPath = app.request.locale == locale ? joinUsARURL : joinUsENURL %}
{% endif %}
<div class="addCompoundContainer col-lg-12 col-md-12 col-sm-12 col-xs-12">
<div class="container-fluid">
<div class="row">
<div class="col-xs-12">
<div class="header">
<div class="questionContainer">
<h2 class="custom-header white">
<a href="{{ joinNowPath }}" rel="nofollow" alt="Join">{{ 'layout.compound_planner.compound_join'|trans }}</a>
</h2>
<p class="responsive_style">
{{ 'layout.compound_planner.compound_git_more'|trans }} </p>
</div>
<div class="ask-question-btn-container">
<a class="btn btn-block btn-warning" href="{{ joinNowPath }}" rel="nofollow" alt="joinNow">{{ 'layout.compound_planner.join_now'|trans }}</a>
</div>
</div>
</div>
</div>
</div>
</div>
{% if isEnabledFeature('web.sharing.page') %}
<a class="listing-share-btn-container fixedBottom borderLight" data-toggle="modal" data-target="#listingShareModal">
<label>{{ 'layout.compounds_title'|trans }}</label>
<div class="btn btn-default btn-share">
<i class="fa fa-share-alt"></i>
<label class="hidden-lg hidden-xl">{{ 'layout.share'|trans }}</label>
</div>
</a>
{% endif %}
</div>
<!-- /Pagination -->
</div>
</section><!-- sectionsContainer -->
<div class="container">
<div class="col-lg-12 col-md-12 col-sm-12 col-xs-12 mobile-breadcrumb visible-sm visible-xs">
{% set COMPOUND_SEARCH_BREADCRUMB = knp_menu_get('compound_search.breadcrumb') %}
{{
knp_menu_render(COMPOUND_SEARCH_BREADCRUMB , {
'allow_safe_labels': true,
'template': 'knp_breadcrumbs.html.twig',
'currentAsLink': true,
'currentClass': 'active',
})
}}
</div>
</div>
<div class="container">
{% if isEnabledFeature('web.seo.compound.locations.sublinks') and neighborhoodLocation %}
<div class="discussions">
<div class="tab-content searchResultsContainer interested-listings subsLinks more-locations-container">
{% include "@AqarmapMainBundle/Default/locationsSubLinks.html.twig" with {'location': neighborhoodLocation} %}
</div>
</div>
{% endif %}
</div>
{% if isEnabledFeature('web.seo.custom.pragraphs') and customParagraph and listings.currentPageNumber == 1 %}
<br>
{% include '@AqarmapListingBundle/Listing/custom_paragraph.html.twig' with {'customParagraph': customParagraph} %}
{% endif %}
{% if isEnabledFeature('web.sharing.page') %}
{% include '@AqarmapListingBundle/Listing/listingShareModal.html.twig' %}
{% endif %}
{% if isCtaButtonsEnabled %}
{{ include('@AqarmapListingBundle/Listing/listingPhoneModal.html.twig') }}
<div ng-controller="listingLeadsWizardController">
<div ng-content-loaded callback="initFormWizard()">
{{ include('@AqarmapUserBundle/User/listingMultiStepLeadModal.html.twig') }}
</div>
</div>
{{ include('@AqarmapUserBundle/User/RegistrationSurvey.html.twig') }}
{% endif %}
{% endblock %}
{% block stylesheets %}
{% if isMobile %}
{% set compoundsBuild = 'builds/css/compoundsBuild' ~ (app.environment == 'dev' ? '' : '.min') ~'.css' %}
<link rel="preload" href="{{ asset(compoundsBuild) }}" as="style" onload="this.onload=null;this.rel='stylesheet'">
<noscript><link rel="stylesheet" href="{{ asset(compoundsBuild) }}"></noscript>
{% endif %}
{{ parent() }}
{% endblock %}
{% block getTranslations %}
<script>
function getAddLocationPlaceHolder() {
return '{{ 'layout.compound_planner.add_name_placeholer'|trans }}';
}
function getDefaultPlaceHolder() {
return '{{ 'layout.compound_planner.search_for_placeholder'|trans }}';
}
</script>
{% endblock %}
{% block categorizedJavascripts %}
<script src="{{ asset('builds/js/buildCompoundsCritical'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
<script defer src="{{ asset('builds/js/buildCompoundsVendors'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
<script defer src="{{ asset('builds/js/buildCompounds'~ (app.environment == 'dev' ? '' : '.min') ~'.js') }}"></script>
{% if topBar is not null %}
{{ encore_entry_script_tags('countdown') }}
{% endif %}
{% endblock %}
{% block javascripts %}
{{ parent() }}
<script>
jQuery(document).ready(function(){
$('#price_level').addClass('active');
$('.showMore').each(function () {
var $this = $(this);
var numberOfULChilds = getNestedChildrens(this, '.nestedContainer', '.parentUL');
var numberOfVisibleItems = getParents($this, '.nestedContainer').attr('data-hideStartFrom');
if(numberOfULChilds.length >= numberOfVisibleItems){
$this.css('display', 'block');
}
});
});
</script>
<script>
jQuery(document).ready(function ($) {
loadMoreInit('.sectionLoadMore');
});
</script>
{% endblock %}
{% block htmlhead %}
{% if app.request.get('page') and app.request.get('page') > 1 %}
{% set canonical_url = url(app.request.get('_route'), app.request.get('_route_params')|merge({'page': app.request.get('page')})) %}
{% else %}
{% set canonical_url = url(app.request.get('_route'), app.request.get('_route_params')) %}
{% endif %}
<link rel="canonical" href="{{ canonical_url }}"/>
{% endblock %}