{% extends 'base.html.twig' %}
{% block canon_url_search %}
{% if seo_strategy == 'index' %}
{% set req_attr = app.request.attributes.get('_route_params') %}
{% set req_attr_con = {
'type' : req_attr['type'],
'departement': req_attr['departement'],
'commerce_type': req_attr['commerce_type'],
'page': app.request.query.get('page'),
'ville': app.request.query.get('ville')
} %}
{% if req_attr_con.page|default('') == 1 %}
{% set req_attr_con = req_attr_con|arr_unset('page') %}
{% endif %}
<link rel="canonical" href="{{ url(app.request.attributes.get('_route'), req_attr_con) }}" />
{% else %}
<meta name="robots" content="noindex">
{% endif %}
{% endblock %}
{% block content %}
{% set params = app.request.attributes.get('_route_params') %}
{% set breadcrumbArr = [] %}
<div class="herolander sm-herolander mb-5">
<div class="container">
<div class="row position-relative z-10">
<div class="col-lg-12">
<h1 class="spec_title text-white">{{ h1_main }}</h1>
<p class="spec_title text-white"><em>{{ number_results }} offres correspondent à vos critères</em></p>
</div>
<div class="col-lg-12">
<nav aria-label="breadcrumb">
<ol class="breadcrumb bg-transparent pl-0">
<li class="breadcrumb-item">
<a href="{{ url('homepage') }}" class="text-white">Accueil</a>
</li>
{% if params.type %}
{% set bd_url = url('search_results', {'type': params.type}) %}
{% set bd_text = params.type|search_breadcrumb('type') %}
{% set breadcrumbArr = breadcrumbArr|merge([{'url': bd_url, 'text': bd_text}]) %}
{% if bd_url == app.request.uri %}
<li class="breadcrumb-item active text-white" aria-current="page">
<u>{{ h1_main }}</u>
</li>
{% else %}
<li class="breadcrumb-item">
<a href="{{ bd_url }}" class="text-white">{{ bd_text }}</a>
</li>
{% endif %}
{% endif %}
{% if params.commerce_type %}
{% set bd_url = url('search_results', {'type': params.type, 'commerce_type': params.commerce_type}) %}
{% set bd_text = params.commerce_type|search_breadcrumb('commerce_type') %}
{% set breadcrumbArr = breadcrumbArr|merge([{'url': bd_url, 'text': bd_text}]) %}
{% if bd_url == app.request.uri %}
<li class="breadcrumb-item active text-white" aria-current="page">
<u>{{ h1_main }}</u>
</li>
{% else %}
<li class="breadcrumb-item">
<a href="{{ bd_url }}" class="text-white">{{ bd_text }}</a>
</li>
{% endif %}
{% endif %}
{% if params.departement %}
{% set bd_url = url('search_results',{'type': params.type, 'commerce_type': params.commerce_type, 'departement': params.departement}) %}
{% set bd_text = params.departement|search_breadcrumb('departement') %}
{% set breadcrumbArr = breadcrumbArr|merge([{'url': bd_url, 'text': bd_text}]) %}
{% if bd_url == app.request.uri %}
<li class="breadcrumb-item active text-white" aria-current="page">
<u>{{ h1_main }}</u>
</li>
{% else %}
<li class="breadcrumb-item">
<a href="{{ bd_url }}" class="text-white">{{ bd_text }}</a>
</li>
{% endif %}
{% endif %}
</ol>
</nav>
</div>
</div>
</div>
</div>
<script type="application/ld+json">
{
"@context": "http://schema.org",
"@type": "BreadcrumbList",
"itemListElement":
[
{% for keyword in breadcrumbArr %}
{% if keyword is iterable %}
{
"@type": "ListItem",
"position": {{ loop.index }},
"item":
{
"@id": "{{ keyword.url }}",
"name": "{{ keyword.text }}"
}
}
{% endif %}
{% if not loop.last %},{% endif %}
{% endfor %}
]
}
</script>
<section class="search-results">
<div class="container">
{% if agent_info %}
<h3 class="spec_title title-regular">
<em>Annonces de</em>
<span class="label label-info"> {{ agent_info.raison_sociale|raw }}</span>
<img height="45" style="vertical-align:bottom" src="{{ agent_info.logo }}" alt="logo {{ agent_info.raison_sociale }}">
</h3>
{% endif %}
{% block error %}
{% if error is defined %}
{% include 'default/error.html.twig' %}
{% endif %}
{% endblock %}
{#<div class="search-filter">
<div class="row">
<div class="col-lg-12 text-center">
<div class="spec_title _title h4">
<b><span class="">{{ number_results }} offres</span> correspondent à vos critères : </b>
<hr>
</div>
<div class="criterias">
{% for keyword in keywords %}
{% if keyword is iterable %}
<p class="bg-success p-2 mx-1 rounded-lg d-inline-block"><a style="color: white" href="{{ keyword.url }}">{{ keyword.text }}</a></p>
{% else %}
<p class="bg-success p-2 mx-1 rounded-lg d-inline-block">{{ keyword }}</p>
{% endif %}
{% endfor %}
</div>
</div>
</div>
</div>#}
<div class="row d-flex align-items-center mb-3">
<div class="col-lg-9 text-right">
{% if pagination is not empty %}
{% include "search/pagination.html.twig" %}
{% endif %}
</div>
<div class="col-lg-3">
{% if order_select is not empty %}
{% include "search/order.html.twig" %}
{% endif %}
</div>
</div>
<div class="row">
<hr>
<div class="col-lg-12">
<div class="content">
{% for item in items if items is defined %}
{% include "search/item.html.twig" %}
{% endfor %}
</div>
</div>
<div class="col-lg-12 text-center my-3">
{% if pagination is not empty %}
{% include "search/pagination.html.twig" %}
{% endif %}
</div>
<div class="row d-flex align-items-center w-100 mb-3">
{% if keywords_suggestions %}
<div class="col-lg-12">
<span class="spec_title _title">
<b><span class="">Suggestions : </span></b>
</span>
<div class="criterias w-100">
{% for keyword in keywords_suggestions %}
{% if keyword is iterable %}
<div class="d-inline-block bg-dark p-2 m-1 text-white rounded-lg"><a class="text-white" href="{{ keyword.url }}">{{ keyword.text }}</a></div>
{% else %}
<div class="d-inline-block bg-dark p-2 mx-1 rounded-lg">{{ keyword }}</div>
{% endif %}
{% endfor %}
</div>
</div>
{% endif %}
</div>
</div>
<small class="_notification _notification-simple text-center">
<span class="zmdi zmdi-circle text-danger"></span>
Les informations données sur ce site n’ont pas un caractère contractuel. Les caractéristiques des biens à vendre ainsi que leur prix, bien que faisant l’objet d’une attention particulière, sont données sous réserve d’erreurs de saisie ou de vente.
</small>
<script type="application/ld+json">
{"@context":"http://schema.org","@type":"ItemList","name": "{{ page_title }}","numberOfItems":"{{ items|length }}","itemListElement":[
{% if items is defined %}
{% for item in items %}
{"@type":"Product","category":"{{ item.commerce_type }}","name":"{{ item.title }}","image":"{{ url('homepage') ~ item.picture1 }}",
"description":"{{ item.description }}",
"url":"{{ url('homepage') ~ item.url }}",
"productid":"{{ item.biz_id }}",
"offers":{"@type":"Offer","price":"{{ item.price }}","priceCurrency":"EUR","availableAtOrFrom":{"@type":"Place","address":{"@type":"PostalAddress","addressLocality": "{% if item.found_communes %}{{ item.found_communes }},{% endif %}{{ item.departement }}","addressRegion": "{{ item.region }}"}}}
}{% if not loop.last %},{% endif %}
{% endfor %}
{% endif %}
]}
</script>
</div>
</section>
{% endblock %}