{% extends '@NotarisFrontend/layout2017.html.twig' %}
{% set headTitle = '' %}
{% if notaryId is defined %}
{% set headTitle = info.header1 | replace({"<BR />":" "}) ~ " - " ~ subsite.pageTitle %}
{% else %}
{% set headTitle = ('pb_' ~ type ~ '_header') | trans ~ " | " %}
{% set headTitle = headTitle ~ subsite.pageTitle ~ ' ' ~ 'alg_basetitle' | trans %}
{% endif %}
{% set linked_url_nl = url_nl ~ path('notaris_frontend_news.nl') %}
{% set linked_url_fr = url_fr ~ path('notaris_frontend_news.fr') %}
{#{% if notaryId is defined %}#}
{#{% set headTitle = info.header1 | replace({"<BR />":" "}) ~ ' - ' ~ subsite.pageTitle %}#}
{#{% else %}#}
{#{% set headTitle = subsite.pageTitle %}#}
{#{% set headTitle = headTitle ~ " | " ~ 'pb_header' | trans %}#}
{#{% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}#}
{#{% endif %}#}
{% block title %}
<title>{{ headTitle }}</title>
{% endblock %}
{% if section.slug == 'infofiches' or section.slug == 'fiches-dinfo' %}
{% set path = 'notaris_frontend_infofiches' %}
{% else %}
{% set path = 'notaris_frontend_brochures' %}
{% endif %}
{% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %}
{% set canonicallink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path(path, {_locale: locale, subsiteSlug: subsite.slug}) %}
{% else %}
{% set canonicallink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path(path, {subsiteSlug: subsite.slug}) %}
{% endif %}
{% block extralinks %}
{% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %} {#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(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
{% set hreflang_fr = hreflang_start_fr ~ path(path, {_locale: 'fr', subsiteSlug: subsite.slug}) %}
<link rel="alternate" hreflang="nl-be"
href="{{ hreflang_nl }}" />
<link rel="alternate" hreflang="fr-be"
href="{{ hreflang_fr }}" />
{% set hreflang_x = hreflang_start_x ~ path(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
{% 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] %}
{% set hreflang_x = hreflang_start_x ~ path(path, {_locale: notaryId.locale, subsiteSlug: subsite.slug}) %}
{% endif %}
{% set hreflang_nl = hreflang_start_nl ~ path(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
{% set hreflang_fr = hreflang_start_fr ~ path(path, {_locale: 'fr', subsiteSlug: subsite.slug}) %}
<link rel="alternate" hreflang="nl"
href="{{ hreflang_nl }}" />
<link rel="alternate" hreflang="fr"
href="{{ hreflang_fr }}" />
{% endif %}
<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.meta.ogTitle != '' %}#}
{#<meta property="og:title" content="{{ subsite.meta.ogTitle }}" />#}
{#{% endif %}#}
{% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %}
{% 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 %}
{% endblock %}
{% block body %}
<!-- content -->
<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 }}">
<!-- intro for content pages-->
<div id="content-center-header">
<article class="niveau1">
<!-- niveau 1 -->
<div class="article-header">
<h1>{{ section.title }}</h1>
</div>
<div class="article-content">
<p>{{ section.description | raw }}</p>
</div>
<!-- niveau 2 en 3 -->
</article>
</div>
<!-- intro for content pages-->
<section id="info">
{# REPEAT #}
<div id="info-content" class="niveau1">
{% for brochure in brochures %}
<article>
<div class="movie-list-wrapper">
<a class="movie-list" href="{{ path('notaris_frontend_brochure_downloads', { 'brochureId' : brochure.id, 'subsiteSlug': subsite.slug, } ) }}" target="_blank">
{% if brochure.asset.assetImages | length > 0 %}
{% set thumbimage = '/uploads/' ~ locale ~ '/' ~ brochure.asset.assetImages[0].image.filename %}
{% set imgpath = thumbimage | imagine_filter('brochures_thumb') %}
<img src="{{ imgpath|replace({'http:': scheme_url~':'}) }}" alt="{{ brochure.asset.assetImages[0].image.alt }}" style="width: auto !important;" class="u-margin-right-small"/>
{% else %}
GEEN image {{ brochure.id }}
{% endif %}
</a>
</div>
<div class="movie-list-right">
<p>
<strong>{{ brochure.title }}</strong>
</p>
<p>
{% if brochure.asset.assetAttachments | length > 0 %}
{% set attachment = brochure.asset.assetAttachments[0].attachment %}
{% set type = attachment.fileType | split('/') %}
<em>({{ type[1] | upper }} / {{ attachment.byte | bfos_format_bytes | replace({'.':','})}}{% if brochure.pages is not null %} / {{ brochure.pages }} {{ 'brochure_paginas' | trans }}{% endif %}){% if brochure.edition is not null %} - {{ 'brochure_versie' | trans }} {{ brochure.edition|date("m/Y") }}{% endif %}</em>
{% else %}
{#GEEN ATTACHMENT {{ brochure.id }}#}
{% endif %}
</p>
{{ brochure.description | raw }}
</div>
<div class="cleaner"> </div>
</article>
{% if brochure.tags | length > 0 %}
<article class="tags border-bottom js-tags">
<p>
{% for tag in brochure.tags %}
<a data-slug="{{ tag.slug }}" data-tag-clicked="{{ path('notaris_frontend_tag_clicked') }}" href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}" title="{{ tag.name }}">{{ tag.name }}</a>
{% endfor %}
</p>
<div class="cleaner"> </div>
</article>
{% endif %}
{% endfor %}
{% if brochures|length == 0 %}
<article class="no-border">
<p style="margin-top:20px;'">{{ 'brochure_geen'| trans }}</p>
</article>
{% endif %}
</div>
{# END REPEAT #}
</section>
</div>
<div class="cleaner hidedesktop"> </div>
</section>
{% endblock %}