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

Open in your IDE?
  1. {% extends '@NotarisFrontend/layout2017.html.twig' %}
  2.     {%  set headTitle = '' %}
  3.     {% if notaryId is defined %}
  4.         {% set headTitle = info.header1  | replace({"<BR />":" "}) ~ " - " ~ subsite.pageTitle %}
  5.     {% else %}
  6.         {% set headTitle = ('pb_' ~ type ~ '_header') | trans ~ " | " %}
  7.         {% set headTitle = headTitle ~ subsite.pageTitle ~ ' ' ~ 'alg_basetitle' | trans %}
  8.     {% endif %}
  9. {% set linked_url_nl = url_nl ~ path('notaris_frontend_news.nl') %}
  10. {% set linked_url_fr = url_fr ~ path('notaris_frontend_news.fr') %}
  11. {#{% if notaryId is defined %}#}
  12.     {#{% set headTitle = info.header1  | replace({"<BR />":" "}) ~ ' - ' ~  subsite.pageTitle %}#}
  13. {#{% else %}#}
  14.     {#{% set headTitle = subsite.pageTitle %}#}
  15.     {#{% set headTitle = headTitle ~ " | " ~   'pb_header' | trans %}#}
  16.     {#{% set headTitle = headTitle ~ ' ' ~ 'alg_basetitle' | trans %}#}
  17. {#{% endif %}#}
  18. {% block title %}
  19.     <title>{{ headTitle }}</title>
  20. {% endblock %}
  21. {% if section.slug == 'infofiches' or section.slug == 'fiches-dinfo' %}
  22.     {% set path = 'notaris_frontend_infofiches' %}
  23. {% else %}
  24.     {% set path = 'notaris_frontend_brochures' %}
  25. {% endif %}
  26. {% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %}
  27.     {% set canonicallink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path(path, {_locale: locale, subsiteSlug: subsite.slug}) %}
  28. {% else %}
  29.     {% set canonicallink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path(path, {subsiteSlug: subsite.slug}) %}
  30. {% endif %}
  31. {% block extralinks %}
  32.     {% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %}  {#for subsites i need to know the translation slug, no connection in database #}
  33.         {% set hreflang_start_nl = url_scheme ~ '://www.' ~ url_nl %}
  34.         {% set hreflang_start_x = url_scheme ~ '://www.' ~ url_nl %}
  35.         {% set hreflang_start_fr = url_scheme ~ '://www.' ~ url_fr %}
  36.         {% set hreflang_nl = hreflang_start_nl ~ path(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
  37.         {% set hreflang_fr = hreflang_start_fr ~ path(path, {_locale: 'fr', subsiteSlug: subsite.slug}) %}
  38.         <link rel="alternate" hreflang="nl-be"
  39.               href="{{ hreflang_nl }}" />
  40.         <link rel="alternate" hreflang="fr-be"
  41.               href="{{ hreflang_fr }}" />
  42.         {% set hreflang_x = hreflang_start_x ~ path(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
  43.         {% if notaryId is defined %}
  44.             {% if sites | length > 0 %}
  45.                 {% for key, site in sites %}
  46.                     {% if key == 'nl' %}
  47.                         {% set hreflang_start_nl = scheme_url ~ '://' ~ site %}
  48.                     {% endif %}
  49.                     {% if key == 'fr' %}
  50.                         {% set hreflang_start_fr = scheme_url ~ '://' ~ site %}
  51.                     {% endif %}
  52.                 {% endfor %}
  53.                 {% set hreflang_start_x = scheme_url ~ '://' ~ sites[notaryId.locale] %}
  54.                 {% set hreflang_x = hreflang_start_x ~ path(path, {_locale: notaryId.locale, subsiteSlug: subsite.slug}) %}
  55.             {% endif %}
  56.             {% set hreflang_nl = hreflang_start_nl ~ path(path, {_locale: 'nl', subsiteSlug: subsite.slug}) %}
  57.             {% set hreflang_fr = hreflang_start_fr ~ path(path, {_locale: 'fr', subsiteSlug: subsite.slug}) %}
  58.             <link rel="alternate" hreflang="nl"
  59.                   href="{{ hreflang_nl }}" />
  60.             <link rel="alternate" hreflang="fr"
  61.                   href="{{ hreflang_fr }}" />
  62.         {% endif %}
  63.         <link rel="alternate" hreflang="x-default"
  64.               href="{{ hreflang_x }}" />
  65.     {% endif %}
  66.     <link rel="canonical" href="{{ canonicallink }}"  />
  67. {% endblock %}
  68. {% block extrameta %}
  69.     {{ parent() }}
  70.     <meta name="keywords" content="{{ subsite.meta.metaKeywords }}"/>
  71.     <meta name="description" lang="{{ locale }}" content="{{ subsite.meta.metaDescription }}"/>
  72.     <meta property="og:url" content="{{ canonicallink }}" />
  73.     <meta property="og:type" content="website" />
  74.     <meta property="og:title" content="{{ headTitle }}" />
  75.     {#{% if subsite.meta.ogTitle != '' %}#}
  76.         {#<meta property="og:title" content="{{ subsite.meta.ogTitle }}" />#}
  77.     {#{% endif %}#}
  78.     {% if subsite.slug == 'nieuws-pers' or subsite.slug == 'nouveautes' %}
  79.         {% if section.meta.ogDescription != '' %}
  80.             <meta property="og:description" content="{{ section.meta.ogDescription }}" />
  81.         {% endif %}
  82.     {% else %}
  83.         {% if subsite.meta.ogDescription != '' %}
  84.             <meta property="og:description" content="{{ subsite.meta.ogDescription }}" />
  85.         {% endif %}
  86.     {% endif %}
  87. {% endblock %}
  88. {% block body %}
  89.     <!-- content -->
  90.     <section class="content u-padding-top-large">
  91.         {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
  92.         <div id="content-center" class="content-center-large {{ subsite.stylesheet }}">
  93.             <!-- intro for content pages-->
  94.             <div id="content-center-header">
  95.                 <article class="niveau1">
  96.                     <!-- niveau 1 -->
  97.                     <div class="article-header">
  98.                         <h1>{{ section.title }}</h1>
  99.                     </div>
  100.                     <div class="article-content">
  101.                         <p>{{ section.description | raw }}</p>
  102.                     </div>
  103.                     <!-- niveau 2 en 3 -->
  104.                 </article>
  105.             </div>
  106.             <!-- intro for content pages-->
  107.             <section id="info">
  108.                 {# REPEAT #}
  109.                 <div id="info-content" class="niveau1">
  110.                     {% for brochure in brochures %}
  111.                         <article>
  112.                             <div class="movie-list-wrapper">
  113.                                 <a class="movie-list" href="{{ path('notaris_frontend_brochure_downloads', { 'brochureId' : brochure.id, 'subsiteSlug': subsite.slug, } ) }}" target="_blank">
  114.                                     {% if brochure.asset.assetImages | length > 0 %}
  115.                                         {% set thumbimage = '/uploads/' ~ locale ~ '/' ~ brochure.asset.assetImages[0].image.filename %}
  116.                                         {% set imgpath =  thumbimage | imagine_filter('brochures_thumb') %}
  117.                                         <img src="{{ imgpath|replace({'http:': scheme_url~':'}) }}" alt="{{ brochure.asset.assetImages[0].image.alt }}" style="width: auto !important;"  class="u-margin-right-small"/>
  118.                                     {% else %}
  119.                                     GEEN image {{ brochure.id }}
  120.                                     {% endif %}
  121.                                 </a>
  122.                             </div>
  123.                             <div class="movie-list-right">
  124.                                 <p>
  125.                                     <strong>{{ brochure.title }}</strong>
  126.                                 </p>
  127.                                 <p>
  128.                                     {% if brochure.asset.assetAttachments | length > 0 %}
  129.                                         {% set attachment = brochure.asset.assetAttachments[0].attachment %}
  130.                                         {% set type = attachment.fileType | split('/') %}
  131.                                         <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>
  132.                                     {% else %}
  133.                                         {#GEEN ATTACHMENT {{ brochure.id }}#}
  134.                                     {% endif %}
  135.                                 </p>
  136.                                 {{ brochure.description | raw }}
  137.                             </div>
  138.                             <div class="cleaner">&nbsp;</div>
  139.                         </article>
  140.                         {% if brochure.tags | length > 0 %}
  141.                         <article class="tags border-bottom js-tags">
  142.                             <p>
  143.                                 {% for tag in brochure.tags %}
  144.                                     <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>
  145.                                 {% endfor %}
  146.                             </p>
  147.                             <div class="cleaner">&nbsp;</div>
  148.                         </article>
  149.                         {% endif %}
  150.                     {% endfor %}
  151.                     {% if brochures|length == 0 %}
  152.                         <article class="no-border">
  153.                         <p style="margin-top:20px;'">{{ 'brochure_geen'| trans }}</p>
  154.                         </article>
  155.                     {% endif %}
  156.                 </div>
  157.                 {# END REPEAT #}
  158.             </section>
  159.         </div>
  160.         <div class="cleaner hidedesktop">&nbsp;</div>
  161.     </section>
  162. {% endblock %}