{% extends '@NotarisFrontend/layout2017.html.twig' %}
{% if notaryId is defined %}
{% set headTitle = info.header1 | replace({"<BR />":" "}) ~ ' - ' ~ subsite.pageTitle %}
{% else %}
{% set headTitle = subsite.pageTitle %}
{% if subsite.slug != 'faq' %}
{% set headTitle = headTitle ~ " | " ~ 'FAQ ' %}
{% endif %}
{% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}
{% endif %}
{% block title %}
<title>{{ headTitle }}</title>
{% endblock %}
{% if subsite.slug == 'faq' %}
{% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_faq') %}
{% else %}
{% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_faq_subsite', {subsiteSlug: subsite.slug}) %}
{% endif %}
{% set linked_url_nl = url_nl ~ path('notaris_frontend_faq') %}
{% set linked_url_fr = url_fr ~ path('notaris_frontend_faq') %}
{% block extralinks %}
{% if subsite.slug == 'faq' %} {# for subsites i need to know the translation slug, no connection in database #}
{% set hreflang_start_nl = url_scheme ~ '://www.' ~ url_nl %}
{% set hreflang_start_x = url_scheme ~ '://www.' ~ url_nl %}
{% set hreflang_start_fr = url_scheme ~ '://www.' ~ url_fr %}
{% set hreflang_nl = hreflang_start_nl ~ path('notaris_frontend_faq') %}
{% set hreflang_x = hreflang_start_x ~ path('notaris_frontend_faq') %}
{% set hreflang_fr = hreflang_start_fr ~ path('notaris_frontend_faq') %}
<link rel="alternate" hreflang="nl-be"
href="{{ hreflang_nl }}" />
<link rel="alternate" hreflang="fr-be"
href="{{ hreflang_fr }}" />
{% if notaryId is defined %}
{% if sites | length > 0 %}
{% for key, site in sites %}
{% if key == 'nl' %}
{% set hreflang_start_nl = scheme_url ~ '://' ~ site %}
{% endif %}
{% if key == 'fr' %}
{% set hreflang_start_fr = scheme_url ~ '://' ~ site %}
{% endif %}
{% endfor %}
{% set hreflang_start_x = scheme_url ~ '://' ~ sites[notaryId.locale] %}
{% endif %}
{% set hreflang_nl = hreflang_start_nl ~ path('notaris_frontend_faq') %}
{% set hreflang_fr = hreflang_start_fr ~ path('notaris_frontend_faq') %}
<link rel="alternate" hreflang="nl"
href="{{ hreflang_nl }}" />
<link rel="alternate" hreflang="fr"
href="{{ hreflang_fr }}" />
{% endif %}
{% set hreflang_x = hreflang_start_x ~ path('notaris_frontend_faq') %}
<link rel="alternate" hreflang="x-default"
href="{{ hreflang_x }}" />
{% endif %}
<link rel="canonical" href="{{ canonicalLink }}" />
{% endblock %}
{% block extrameta %}
{{ parent() }}
<meta name="keywords" content="{{ subsite.meta.metaKeywords }}"/>
<meta name="description" lang="{{ locale }}" content="{{ subsite.meta.metaDescription }}"/>
<meta property="og:url" content="{{ canonicalLink }}" />
<meta property="og:type" content="website" />
<meta property="og:title" content="{{ headTitle }}" />
{% if subsite.slug == 'faq' %}
{% if section.meta.ogDescription != '' %}
<meta property="og:description" content="{{ section.meta.ogDescription }}" />
{% endif %}
{% else %}
{% if subsite.meta.ogDescription != '' %}
<meta property="og:description" content="{{ subsite.meta.ogDescription }}" />
{% endif %}
{% endif %}
{#{% if subsite.meta.ogTitle != '' %}#}
{#<meta property="og:title" content="{{ subsite.meta.ogTitle }}" />#}
{#{% endif %}#}
{% endblock %}
{% block body %}
<section class="content u-padding-top-large">
{{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
<div id="content-center" class="content-center-large {{ subsite.stylesheet }}">
<section id="info" class="no-margin">
<div id="info-content" class="niveau1 info-faq-content">
{% if faqgeneral | length > 0 %}
{% for sub in faqgeneral %}
<div class="info-content-faq">
<a class="info-content-faq-question info-content-blocklink" href="#">
{% if loop.index0 == 0 %}
<h2>{{ sub.subsite.name }} ({{ sub.faqs | length }})</h2>
{% else %}
<h2>{{ 'faq_vragenover' | trans }} {{ sub.subsite.name }} ({{ sub.faqs | length }})</h2>
{% endif %}
<div class="cleaner"> </div>
</a>
<article>
<ol>
{% set max = 3 %}
{% if loop.index0 < 1 or sub.subsite.slug == 'mybox' %}
{% set max = sub.faqs | length %}
{% endif %}
{% for faq in sub.faqs | slice(0, max) %}
<li><a class="no-border" data-id="{{ faq.id }}" href="{{ path('notaris_frontend_faq_subsite_detail', {'subsiteSlug': sub.subsite.slug, 'faqSlug': faq.slug}) }}" title="{{ faq.title }}">{{ faq.title }}</a></li>
{% endfor %}
</ol>
{% if max < sub.faqs | length %}
<p>{{ 'faq_meervragen' | trans | raw }}<br />
<a href="{{ path('notaris_frontend_faq_subsite', {'subsiteSlug': sub.subsite.slug}) }}" title="{{ sub.subsite.name }}">{{ sub.subsite.name }}</a></p>
{% endif %}
</article>
</div>
{% endfor %}
{% endif %}
{% if faqsubsites | length > 0 %}
<div class="info-content-faq">
<a class="info-content-faq-question info-content-blocklink" href="#">
<h2>{{ 'faq_vragenover' | trans }} {{ subsite.name }} ({{ faqsubsites | length }})</h2>
<div class="cleaner"> </div>
</a>
<article class="show-article">
<ol>
{% for faq in faqsubsites %}
<li><a class="no-border" data-id="{{ faq.id }}" href="{{ path('notaris_frontend_faq_subsite_detail', {'subsiteSlug': subsite.slug, 'faqSlug': faq.slug}) }}" title="{{ faq.title }}">{{ faq.title }}</a></li>
{% endfor %}
</ol>
</article>
</div>
{% endif %}
</div>
</section>
</div>
{#
<aside id="content-right">
{% if notaryId is defined %}
{{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
{% else %}
{{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
{% endif %}
</aside>
#}
{% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': subsite.slug, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
</section>
{% endblock %}
{% block extrajs %}
<script>
//adresbook();
//faq();
$(document).ready(function(){
$('.info-content-faq li a').click(function(e){
var id = $(this).attr('data-id');
var href = $(this).attr('href');
$.getJSON('{{ path('notaris_frontend_faq_click') }}/'+id, function(data){
window.location.href = href;
});
e.preventDefault();
});
});
</script>
{% endblock %}