{% extends '@NotarisFrontend/layout2017.html.twig' %}
{% block title %}
{% if notaryId is defined %}
<title>{{ info.header1 | replace({"<BR />":" "}) }} - {{ tag.name }}</title>
{% else %}
<title>Context | {{ tag.name }} {{ 'alg_basetitle' | trans }} </title>
{% endif %}
{% endblock %}
{% block extralinks %}
<link rel="canonical" href="{{ url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_tag', {tagSlug: tag.slug}) }}" />
{% endblock %}
{% block body %}
<!-- content -->
<section class="content u-padding-top-large">
<aside id="content-left" class="content-left-small hidesmartphone">
<nav class="standard-nav">
<ul class="u-margin-left-none u-padding-left-none">
<li class="active">
<div class="activestate"> </div>
<a href="#" title="Context" class="hi">Context</a>
</li>
</ul>
</nav>
</aside>
<div id="content-center" class="content-right content-center-large notaris">
<div id="content-center-header">
<article class="niveau1">
<div class="article-header u-padding-small u-word-wrap u-word-wrap-hyphens@mobile">
<h1 class="u-text-lineheight-semilarge u-h2@desktop">{{ tag.name | capitalize }}</h1>
</div>
{% if tag.description %}
<div class="article-content">
{{ tag.description | raw }}
<div class="cleaner"> </div>
</div>
{% endif %}
</article>
<article class="niveau3 fillcolor u-margin-top-large">
<div class="article-content">
<h2 class="u-text-lineheight-semilarge u-h2-small">{{ 'tag_artikelsgevonden1' | trans | raw }} "{{ tag.name }}" {{ 'tag_artikelsgevonden2' | trans | raw }} {{ total }} {{ 'tag_artikelsgevonden3' | trans | raw }}.</h2>
</div>
</article>
</div>
{% if totalpages > 1 %}
<div class="prevnext-pages border-bottom">
{% if currentpage + 1 != 1 %}
{% if currentpage == 1 %}
<a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
{% else %}
<a href="{{ path('notaris_frontend_tag_page', {'page': currentpage - 1, 'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
{% endif %}
{% else %}
<span>{{ 'vorige' | trans | raw }}</span>
{% endif %}
{% set count = 0 %}
{% set vispages = 4 %}
{% set index = 0 %}
{% if currentpage + 1 <= 2 %}
{% set start = 1 %}
{% else %}
{% set start = currentpage + 1 - 2 %}
{% set vispages = vispages + 1 %}
{% endif %}
{% if start + 4> totalpages %}
{% set start = totalpages - 3 %}
{% endif %}
{% if start < 1 %}
{% set start = 1 %}
{% endif %}
{% if start != 1 %}
<span>...</span>
{% endif %}
{% for i in start..totalpages %}
{% set count = count + 1 %}
{% if count <= vispages %}
{% set index = i %}
{% if i == currentpage + 1 %}
<span class="current">{{ i }}</span>
{% else %}
{% if i == 1 %}
<a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ i }}</a>
{% else %}
<a href="{{ path('notaris_frontend_tag_page', {'page': i - 1, 'tagSlug': tag.slug}) }}">{{ i }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if index != totalpages %}
<span>...</span>
{% endif %}
{% if currentpage + 1 != totalpages %}
<a href="{{ path('notaris_frontend_tag_page', {'page': currentpage + 1, 'tagSlug': tag.slug}) }}">{{ 'volgende' | trans | raw }}</a>
{% else %}
<span>{{ 'volgende' | trans | raw }}</span>
{% endif %}
</div>
{% endif %}
<section id="info" class="no-margin">
<div id="info-content" class="niveau1 info-news-content">
{% for tagresult in tagresults %}
{% set index = loop.index + (currentpage * 25) %}
<a class="info-content-blocklink" href="{{ tagresult.urlpath }}" title="{{ tagresult.title }}">
<h2 class="u-text-lineheight-semilarge u-h2-small-bold {% if not tagresult.description %} u-h2-margin {% else %} u-h2-no-margin{% endif %}">{{ tagresult.title }}</h2>
{% if tagresult.description %}
<p class="no-top-padding">
{% set words = tagresult.description | striptags | split(' ') %}
{% for word in words|slice(0, 22) %}
{% if loop.last and words|length > 22 %}
{{ word | replace({'.':''}) | raw }}...
{% else %}
{{ word | raw }}
{% endif %}
{% endfor %}
</p>
{% endif %}
</a>
{% endfor %}
</div>
</section>
{% if totalpages > 1 %}
<div class="prevnext-pages">
{% if currentpage + 1 != 1 %}
{% if currentpage == 1 %}
<a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
{% else %}
<a href="{{ path('notaris_frontend_tag_page', {'page': currentpage - 1, 'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
{% endif %}
{% else %}
<span>{{ 'vorige' | trans | raw }}</span>
{% endif %}
{% set count = 0 %}
{% set vispages = 4 %}
{% set index = 0 %}
{% if currentpage + 1 <= 2 %}
{% set start = 1 %}
{% else %}
{% set start = currentpage + 1 - 2 %}
{% set vispages = vispages + 1 %}
{% endif %}
{% if start + 4> totalpages %}
{% set start = totalpages - 3 %}
{% endif %}
{% if start < 1 %}
{% set start = 1 %}
{% endif %}
{% if start != 1 %}
<span>...</span>
{% endif %}
{% for i in start..totalpages %}
{% set count = count + 1 %}
{% if count <= vispages %}
{% set index = i %}
{% if i == currentpage + 1 %}
<span class="current">{{ i }}</span>
{% else %}
{% if i == 1 %}
<a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ i }}</a>
{% else %}
<a href="{{ path('notaris_frontend_tag_page', {'page': i - 1, 'tagSlug': tag.slug}) }}">{{ i }}</a>
{% endif %}
{% endif %}
{% endif %}
{% endfor %}
{% if index != totalpages %}
<span>...</span>
{% endif %}
{% if currentpage + 1 != totalpages %}
<a href="{{ path('notaris_frontend_tag_page', {'page': currentpage + 1, 'tagSlug': tag.slug}) }}">{{ 'volgende' | trans | raw }}</a>
{% else %}
<span>{{ 'volgende' | trans | raw }}</span>
{% endif %}
</div>
{% endif %}
</div>
<div class="cleaner hidedesktop"> </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': '', 'isSven':false, 'isHome':false, 'subsite': ''} %}
</section>
{% endblock %}
{% block footer %}
<div class="u-bg-off-white u-padding-top-small u-padding-bottom-large">
<div class="o-wrapper">
<div class="o-layout">
{% for subsite in getSubsites(locale) %}
<div class="o-layout__item u-1/1 u-1/2@mobile u-1/3@tablet u-1/4@desktop c-tags u-padding-top-small js-tags">
<p class="u-margin-bottom-tiny u-color-{{ subsite.stylesheet }}">{{ subsite.name }}</p>
{% for tag in getTags(subsite) %}
<div class="u-clearfix">
<a data-slug="{{ tag.slug }}" data-tag-clicked="{{ path('notaris_frontend_tag_clicked') }}" href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug }) }}" title="{{ tag.name }}" class="c-tags__item c-tags__item--block c-tags__item--showonhover c-tags__item--footer u-text-small">{{ tag.name }}</a>
</div>
{% endfor %}
</div>
{% endfor %}
</div>
</div>
</div>
{% endblock %}
{% block extrajs %}
{% endblock %}