src/Notaris/FrontendBundle/Resources/views/tag/index.html.twig line 1

Open in your IDE?
  1. {% extends '@NotarisFrontend/layout2017.html.twig' %}
  2. {% block title %}
  3.     {% if notaryId is defined %}
  4.         <title>{{ info.header1  | replace({"<BR />":" "}) }} - {{ tag.name }}</title>
  5.     {% else %}
  6.         <title>Context | {{ tag.name }} {{ 'alg_basetitle' | trans }} </title>
  7.     {% endif %}
  8. {% endblock %}
  9. {% block extralinks %}
  10.     <link rel="canonical" href="{{ url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_tag', {tagSlug: tag.slug}) }}"  />
  11. {% endblock %}
  12. {% block body %}
  13.     <!-- content -->
  14.     <section class="content u-padding-top-large">
  15.         <aside id="content-left" class="content-left-small hidesmartphone">
  16.             <nav class="standard-nav">
  17.                 <ul class="u-margin-left-none u-padding-left-none">
  18.                     <li class="active">
  19.                         <div class="activestate">&nbsp;</div>
  20.                         <a href="#" title="Context" class="hi">Context</a>
  21.                     </li>
  22.                 </ul>
  23.             </nav>
  24.         </aside>
  25.         <div id="content-center" class="content-right content-center-large notaris">
  26.             <div id="content-center-header">
  27.                 <article class="niveau1">
  28.                     <div class="article-header u-padding-small u-word-wrap u-word-wrap-hyphens@mobile">
  29.                         <h1 class="u-text-lineheight-semilarge u-h2@desktop">{{ tag.name | capitalize }}</h1>
  30.                     </div>
  31.                     {% if tag.description %}
  32.                         <div class="article-content">
  33.                             {{ tag.description | raw }}
  34.                             <div class="cleaner">&nbsp;</div>
  35.                         </div>
  36.                     {% endif %}
  37.                 </article>
  38.                 <article class="niveau3 fillcolor u-margin-top-large">
  39.                     <div class="article-content">
  40.                         <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>
  41.                     </div>
  42.                 </article>
  43.             </div>
  44.             {% if totalpages > 1 %}
  45.                 <div class="prevnext-pages border-bottom">
  46.                     {% if currentpage + 1 != 1 %}
  47.                         {% if currentpage  == 1 %}
  48.                             <a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
  49.                         {% else %}
  50.                             <a href="{{ path('notaris_frontend_tag_page', {'page': currentpage - 1, 'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
  51.                         {% endif %}
  52.                     {% else %}
  53.                         <span>{{ 'vorige' | trans | raw }}</span>
  54.                     {% endif %}
  55.                     {% set count = 0 %}
  56.                     {% set vispages = 4 %}
  57.                     {% set index = 0 %}
  58.                     {% if currentpage + 1 <= 2 %}
  59.                         {% set start = 1 %}
  60.                     {% else %}
  61.                         {% set start = currentpage + 1 - 2 %}
  62.                         {% set vispages = vispages + 1 %}
  63.                     {% endif %}
  64.                     {% if start + 4> totalpages %}
  65.                         {% set start = totalpages - 3  %}
  66.                     {% endif %}
  67.                     {% if start < 1 %}
  68.                         {% set start = 1 %}
  69.                     {% endif %}
  70.                     {% if start != 1 %}
  71.                         <span>...</span>
  72.                     {% endif %}
  73.                     {% for  i in start..totalpages %}
  74.                         {% set count = count + 1 %}
  75.                         {% if count <= vispages %}
  76.                             {% set index = i %}
  77.                             {% if i == currentpage + 1 %}
  78.                                 <span class="current">{{ i }}</span>
  79.                             {% else %}
  80.                                 {% if i == 1 %}
  81.                                     <a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ i }}</a>
  82.                                 {% else %}
  83.                                     <a href="{{ path('notaris_frontend_tag_page', {'page': i - 1, 'tagSlug': tag.slug}) }}">{{ i }}</a>
  84.                                 {% endif %}
  85.                             {% endif %}
  86.                         {% endif %}
  87.                     {% endfor %}
  88.                     {% if index != totalpages %}
  89.                         <span>...</span>
  90.                     {% endif %}
  91.                     {% if currentpage + 1 != totalpages %}
  92.                         <a href="{{ path('notaris_frontend_tag_page', {'page': currentpage + 1, 'tagSlug': tag.slug}) }}">{{ 'volgende' | trans | raw }}</a>
  93.                     {% else %}
  94.                         <span>{{ 'volgende' | trans | raw }}</span>
  95.                     {% endif %}
  96.                 </div>
  97.             {% endif %}
  98.             <section id="info" class="no-margin">
  99.                 <div id="info-content" class="niveau1 info-news-content">
  100.                     {% for tagresult in tagresults %}
  101.                         {% set index = loop.index + (currentpage * 25) %}
  102.                         <a class="info-content-blocklink" href="{{ tagresult.urlpath }}" title="{{ tagresult.title }}">
  103.                             <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>
  104.                             {% if tagresult.description %}
  105.                             <p class="no-top-padding">
  106.                                 {% set words = tagresult.description | striptags | split(' ') %}
  107.                                 {% for word in words|slice(0, 22) %}
  108.                                     {% if loop.last and words|length > 22 %}
  109.                                         {{ word | replace({'.':''}) | raw }}...
  110.                                     {% else %}
  111.                                             {{ word | raw }}
  112.                                     {% endif %}
  113.                                 {% endfor %}
  114.                             </p>
  115.                             {% endif %}
  116.                         </a>
  117.                     {% endfor %}
  118.                 </div>
  119.             </section>
  120.             {% if totalpages > 1 %}
  121.                 <div class="prevnext-pages">
  122.                     {% if currentpage + 1 != 1 %}
  123.                         {% if currentpage  == 1 %}
  124.                             <a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
  125.                         {% else %}
  126.                             <a href="{{ path('notaris_frontend_tag_page', {'page': currentpage - 1, 'tagSlug': tag.slug}) }}">{{ 'vorige' | trans | raw }}</a>
  127.                         {% endif %}
  128.                     {% else %}
  129.                         <span>{{ 'vorige' | trans | raw }}</span>
  130.                     {% endif %}
  131.                     {% set count = 0 %}
  132.                     {% set vispages = 4 %}
  133.                     {% set index = 0 %}
  134.                     {% if currentpage + 1 <= 2 %}
  135.                         {% set start = 1 %}
  136.                     {% else %}
  137.                         {% set start = currentpage + 1 - 2 %}
  138.                         {% set vispages = vispages + 1 %}
  139.                     {% endif %}
  140.                     {% if start + 4> totalpages %}
  141.                         {% set start = totalpages - 3  %}
  142.                     {% endif %}
  143.                     {% if start < 1 %}
  144.                         {% set start = 1 %}
  145.                     {% endif %}
  146.                     {% if start != 1 %}
  147.                         <span>...</span>
  148.                     {% endif %}
  149.                     {% for  i in start..totalpages %}
  150.                         {% set count = count + 1 %}
  151.                         {% if count <= vispages %}
  152.                             {% set index = i %}
  153.                             {% if i == currentpage + 1 %}
  154.                                 <span class="current">{{ i }}</span>
  155.                             {% else %}
  156.                                 {% if i == 1 %}
  157.                                     <a href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}">{{ i }}</a>
  158.                                 {% else %}
  159.                                     <a href="{{ path('notaris_frontend_tag_page', {'page': i - 1, 'tagSlug': tag.slug}) }}">{{ i }}</a>
  160.                                 {% endif %}
  161.                             {% endif %}
  162.                         {% endif %}
  163.                     {% endfor %}
  164.                     {% if index != totalpages %}
  165.                         <span>...</span>
  166.                     {% endif %}
  167.                     {% if currentpage + 1 != totalpages %}
  168.                         <a href="{{ path('notaris_frontend_tag_page', {'page': currentpage + 1, 'tagSlug': tag.slug}) }}">{{ 'volgende' | trans | raw }}</a>
  169.                     {% else %}
  170.                         <span>{{ 'volgende' | trans | raw }}</span>
  171.                     {% endif %}
  172.                 </div>
  173.             {% endif %}
  174.         </div>
  175.         <div class="cleaner hidedesktop">&nbsp;</div>
  176.         {#
  177.             <aside id="content-right">
  178.                 {% if notaryId is defined %}
  179.                     {{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
  180.                 {% else %}
  181.                     {{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
  182.                 {% endif %}
  183.             </aside>
  184.         #}
  185.         {% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': '', 'isSven':false, 'isHome':false, 'subsite': ''} %}
  186.     </section>
  187. {% endblock %}
  188. {% block footer %}
  189.     <div class="u-bg-off-white u-padding-top-small u-padding-bottom-large">
  190.         <div class="o-wrapper">
  191.             <div class="o-layout">
  192.                 {% for subsite in getSubsites(locale)  %}
  193.                     <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">
  194.                         <p class="u-margin-bottom-tiny u-color-{{ subsite.stylesheet }}">{{ subsite.name }}</p>
  195.                         {% for tag in getTags(subsite) %}
  196.                             <div class="u-clearfix">
  197.                                 <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>
  198.                             </div>
  199.                         {% endfor %}
  200.                     </div>
  201.                 {% endfor %}
  202.             </div>
  203.         </div>
  204.     </div>
  205. {% endblock %}
  206. {% block extrajs %}
  207. {% endblock %}