src/Notaris/FrontendBundle/Resources/views/news/detail.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 />":" "}) }} - {{ subsite.pageTitle }}</title>
  5.     {% else %}
  6.         <title>{{ newsitem.title }} | {{ 'alg_basetitle_nondash' | trans }} - {{ 'mn_nieuws' | trans }}</title>
  7.     {% endif %}
  8. {% endblock %}
  9. {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_news_detail', {slug: newsitem.slug}) %}
  10. {% block extralinks %}
  11.     <link rel="canonical" href="{{ canonicalLink }}"  />
  12. {% endblock %}
  13. {% set linked_url_nl = url_nl ~ path('notaris_frontend_news.nl') %}
  14. {% set linked_url_fr = url_fr ~ path('notaris_frontend_news.fr') %}
  15. {% block extrameta %}
  16.     <meta name="keywords" content="{{ subsite.meta.metaKeywords }}"/>
  17.     <meta name="description" lang="{{ locale }}" content="{{ subsite.meta.metaDescription }}"/>
  18.     <meta property="og:title" content="{{ newsitem.meta.ogTitle }}"/>
  19.     <meta property="og:type" content="article"/>
  20.     <meta property="og:url" content="{{ canonicalLink }}"/>
  21.     <meta property="og:description" content="{{ newsitem.meta.ogDescription }}"/>
  22.     {% if shareImage %}
  23.         <meta property="og:image" content="{{ shareImage }}" />
  24.         <meta property="og:image:width" content="1200" />
  25.         <meta property="og:image:height" content="630" />
  26.     {% else %}
  27.         {{ parent() }}
  28.     {% endif %}
  29. {% endblock %}
  30. {% block body %}
  31.     <section class="content u-padding-top-large">
  32.         {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
  33.         {#{ include('@NotarisFrontend/News/_news_sidenav.html.twig', {'subsite': subsite }) }#}
  34.         <div id="content-center" class="content-center-large {{ subsite.stylesheet }}">
  35.             <div id="content-center-header">
  36.                 <div class="prevnext-pages border-bottom prevnext-pages-color">
  37.                     {% if subsiteslug != '' %}
  38.                         <a href="{{ path('notaris_frontend_subsite_news', {'subsiteslug':subsiteslug}) }}"
  39.                            title="{{ 'nw_volledigenieuwslijst' | trans }}">{{ 'nw_volledigenieuwslijst' | trans }}</a>
  40.                     {% else %}
  41.                         <a href="{{ path('notaris_frontend_news') }}"
  42.                            title="{{ 'nw_volledigenieuwslijst' | trans }}">{{ 'nw_volledigenieuwslijst' | trans }}</a>
  43.                     {% endif %}
  44.                 </div>
  45.             </div>
  46.             <section id="info">
  47.                 <div id="info-content" class="niveau1 u-wysiwyg">
  48.                     {# <h3 class="u-h2 u-margin-bottom-tiny u-text-lineheight-normal u-margin-top-small u-wysiwyg__title">  @TODO IONEL: SEO h1
  49.                         {% if newsitem.isPers %}
  50.                             <div class="c-tooltip c-tooltip--top c-tooltip--5-up u-text-inline">
  51.                                 <span
  52.                                     class="{% if lastPart == subsite.slug %}u-bg-{{ subsite.stylesheet }} {% else %}u-bg-primary {% endif %}u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
  53.                                 <p class="c-tooltip__news">{{ 'nw_pm_meaning' | trans }}</p>
  54.                             </div>
  55.                         {% endif %}
  56.                         {{ newsitem.title }}
  57.                     </h3> #}
  58.                     {% if newsitem.isPers %}
  59.                             <div class="c-tooltip c-tooltip--top c-tooltip--5-up u-text-inline s-ctsm-settpm u-display--inline">
  60.                                 <span
  61.                                     class="{% if lastPart == subsite.slug %}u-bg-{{ subsite.stylesheet }} {% else %}u-bg-primary {% endif %}u-color-white o-tabpannel__label">{{ 'nw_pm' | trans }}</span>
  62.                                 <p class="c-tooltip__news">{{ 'nw_pm_meaning' | trans }}</p>
  63.                             </div>
  64.                     {% endif %}
  65.                     <h1 class="u-h2 u-text-lineheight-normal u-display--inline">{{ newsitem.title }}</h1>
  66.                     <p class="o-tabpannel__content__title__date u-padding-top-tiny u-margin-top-none">{{ newsitem.publicationDate | localdate }}</p>
  67.                     {% if newsitem.introduction != '' %}
  68.                         <p>{{ newsitem.introduction }}</p>
  69.                     {% endif %}
  70.                     {% if newsitem.subtitle != '' %}
  71.                         <h2>{{ newsitem.subtitle }}</h2>
  72.                     {% endif %}
  73.                     {#1 afbeelding met tekst#}
  74.                     {% if newsitem.asset is not null %}
  75.                         {% if newsitem.asset.assetImages is not null %}
  76.                             {% if newsitem.asset.assetImages | length == 1 and newsitem.text != '' %}
  77.                                 {% set image = newsitem.asset.assetImages[0] %}
  78.                                 {% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
  79.                                 <a href="/{{ image_path }}"
  80.                                    {% if image.image.caption is not null %}title="{{ image.image.caption }}"
  81.                                    {% endif %}rel="js-fancybox-{{ newsitem.id }}"
  82.                                    class="o-tabpannel__content__imagelink js-fancybox">
  83.                                     {{ image_path | responsive_image_source([301,238], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 301px, (min-width: 768px and max-width: 960px) 238px', 'alt': image.image.alt}) }}
  84.                                 </a>
  85.                             {% endif %}
  86.                         {% endif %}
  87.                     {% endif %}
  88.                     {% if newsitem.firstParagraphAsset is not null %}
  89.                         {% if newsitem.firstParagraphAsset.assetImages is not null %}
  90.                             {% if newsitem.firstParagraphAsset.assetImages | length == 1 %}
  91.                                 {% set image = newsitem.firstParagraphAsset.assetImages[0] %}
  92.                                 {% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
  93.                                 <a href="/{{ image_path }}"
  94.                                    {% if image.image.caption is not null %}title="{{ image.image.caption }}"
  95.                                    {% endif %}rel="js-fancybox-{{ newsitem.id }}"
  96.                                    class="o-tabpannel__content__imagelink js-fancybox">
  97.                                     {{ image_path | responsive_image_source([301,238], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 301px, (min-width: 768px and max-width: 960px) 238px', 'alt': image.image.alt}) }}
  98.                                 </a>
  99.                             {% endif %}
  100.                         {% endif %}
  101.                     {% endif %}
  102.                     {{ newsitem.text | raw }}
  103.                     <div style="clear: both"></div>
  104.                     {% for paragraph in newsitem.paragraphs|sort((a, b) => a.number <=> b.number) %}
  105.                         {% if paragraph.subtitle != '' %}
  106.                             <h2>{{ paragraph.subtitle }}</h2>
  107.                         {% endif %}
  108.                         {% if paragraph.asset is not null %}
  109.                             {% if paragraph.asset.assetImages is not null %}
  110.                                 {% if paragraph.asset.assetImages | length == 1 %}
  111.                                     {% set image = paragraph.asset.assetImages[0] %}
  112.                                     {% set image_path = 'uploads/'~ image.image.locale ~ image.image.filename %}
  113.                                     <a href="/{{ image_path }}"
  114.                                        {% if image.image.caption is not null %}title="{{ image.image.caption }}"
  115.                                        {% endif %}rel="js-fancybox-{{ paragraph.id }}"
  116.                                        class="o-tabpannel__content__imagelink js-fancybox{% if paragraph.text == '' or paragraph.text == null %} img-full-width{% endif %}">
  117.                                         {% if paragraph.text == '' or paragraph.text == null %}
  118.                                             <img src="/{{ image_path }}" alt="{{ image.image.alt }}">
  119.                                         {% else %}
  120.                                             {{ image_path | responsive_image_source([301,238], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 301px, (min-width: 768px and max-width: 960px) 238px', 'alt': image.image.alt}) }}
  121.                                         {% endif %}
  122.                                     </a>
  123.                                 {% endif %}
  124.                             {% endif %}
  125.                         {% endif %}
  126.                         {{ paragraph.text | raw }}
  127.                         <div style="clear: both"></div>
  128.                     {% endfor %}
  129.                     {#reeks afbeeldingen#}
  130.                     {% if newsitem.asset is not null %}
  131.                         {% if newsitem.asset.assetImages is not null %}
  132.                             {% if not(newsitem.asset.assetImages | length == 1 and newsitem.text != '') %}
  133.                                 {% for image in newsitem.asset.assetImages %}
  134.                                     {% set image_path = 'uploads/'~ image.image.locale  ~ image.image.filename %}
  135.                                     <a href="/{{ image_path }}"
  136.                                        {% if image.image.caption is not null %}title="{{ image.image.caption }}"
  137.                                        {% endif %}rel="js-fancybox-{{ newsitem.id }}"
  138.                                        class="js-fancybox u-display--inlineblock u-margin-bottom-small">
  139.                                         {{ image_path | responsive_image_source([710,477], {'filterset': 'responsive_article_image', 'sizes': '(min-width: 960px) 710px, (min-width: 768px and max-width: 960px) 477px', 'alt': image.image.alt}) }}
  140.                                         {% if image.image.caption is not null %}
  141.                                             <p class="u-margin-top-tiny">{{ image.image.caption }}</p>
  142.                                         {% endif %}
  143.                                     </a>
  144.                                 {% endfor %}
  145.                             {% endif %}
  146.                         {% endif %}
  147.                         {% if newsitem.asset.assetVideoPaths | length > 0 %}
  148.                             <div>
  149.                                 {% for video in newsitem.asset.assetVideoPaths %}
  150.                                     {% if video.videoPath.youtube is not null and video.videoPath.youtube != '' %}
  151.                                         <iframe
  152.                                             class="o-tabpannel__content__youtube js-tabpannel-youtube u-margin-bottom-small"
  153.                                             frameborder="0" allowfullscreen="1" title="YouTube video player" width="490"
  154.                                             height="280"
  155.                                             src="//www.youtube-nocookie.com/embed/{{ video.videoPath.youtube }}?enablejsapi=1&widgetid=1"
  156.                                             kwframeid="2"></iframe>
  157.                                     {% endif %}
  158.                                     {% if video.videoPath.path is not null and video.videoPath.path != '' %}
  159.                                         <video
  160.                                             class="o-tabpannel__content__video js-tabpannel-video u-margin-bottom-small"
  161.                                             controls>
  162.                                             <source src="/video/{{ locale }}/{{ video.videoPath.path }}">
  163.                                         </video>
  164.                                     {% endif %}
  165.                                 {% endfor %}
  166.                             </div>
  167.                         {% endif %}
  168.                     {% endif %}
  169.                     {% if newsitem.asset and (newsitem.asset.assetLinks | length > 0 or newsitem.asset.assetAttachments | length > 0) %}
  170.                         <ul class="u-margin-top-small">
  171.                             {% for link in newsitem.asset.assetLinks %}
  172.                                 <li><a href="{{ link.link.url }}" title="{{ link.link.title }}"
  173.                                        {% if link.link.newWindow %}target="_blank"{% endif %}>{{ link.link.title }}</a>
  174.                                 </li>
  175.                             {% endfor %}
  176.                             {% for attachment in newsitem.asset.assetAttachments %}
  177.                                 {% set fileType = attachment.attachment.filename | split('.') %}
  178.                                 {% set fileType = fileType | last | upper %}
  179.                                 {% set title = attachment.attachment.title %}
  180.                                 {% if title == '' %}
  181.                                     {% set title = attachment.attachment.originalFilename %}
  182.                                 {% endif %}
  183.                                 {% set foo = attachment.attachment.filename|split('/', 2) %}
  184.                                 {% if foo | length >= 1 %}{% set filename = foo[1] %}{% endif %}
  185.                                 {%  if filename is defined %}
  186.                                 <li>
  187.                                     <a href="/download/{{ filename | url_encode }}"
  188.                                        title="{{ title }}">{{ title }}
  189.                                         ({{ fileType }} {{ attachment.attachment.byte | bfos_format_bytes | replace({'.':','}) }}
  190.                                         )</a></li>
  191.                                 {% endif %}
  192.                             {% endfor %}
  193.                         </ul>
  194.                     {% endif %}
  195.                     {% if newsitem.tags | length > 0 %}
  196.                         <div class="c-tags u-margin-bottom-small js-tags">
  197.                             {% for tag in newsitem.tags %}
  198.                                 <a data-slug="{{ tag.slug }}"
  199.                                    data-tag-clicked="{{ path('notaris_frontend_tag_clicked') }}"
  200.                                    href="{{ path('notaris_frontend_tag', {'tagSlug': tag.slug}) }}"
  201.                                    title="{{ tag.name }}" class="c-tags__item"><small>{{ tag.name }}</small></a>
  202.                             {% endfor %}
  203.                         </div>
  204.                     {% endif %}
  205.                     {% if newsitem.source != '' %}
  206.                         <p class="u-margin-top-tiny">{{ 'nw_bron' | trans }}: {{ newsitem.source }}</p>
  207.                     {% endif %}
  208.                     {% if newsitem.author != '' %}
  209.                         <p class="u-margin-top-tiny">Auteur: {{ newsitem.author }}</p>
  210.                     {% endif %}
  211.                     <article class="socialmedia border-bottom">
  212.                         <!-- linkedin -->
  213.                         <a href="http://www.linkedin.com/shareArticle?url={{ app.request.uri }}&title={{ newsitem.meta.ogTitle }}&summary={{ newsitem.meta.ogDescription }}"
  214.                            target="_blank" class="share-btn linkedin">
  215.                             <img style="width:60px!important;height:20px;" src="/images/linkedin.png"/>
  216.                         </a>
  217.                         <div class="spacer">&nbsp;</div>
  218.                         {#<!-- facebook share -->#}
  219.                         {#<a name="fb_share" type="button"></a><script src="http://static.ak.fbcdn.net/connect.php/js/FB.Share" type="text/javascript"></script>#}
  220.                         {#<div class="spacer">&nbsp;</div>#}
  221.                         {#<!-- google plus -->#}
  222.                         {#<div class="g-plusone" data-size="small"></div>#}
  223.                         {#<script type="text/javascript">#}
  224.                         {#window.___gcfg = {lang: 'nl'};#}
  225.                         {#(function() {#}
  226.                         {#var po = document.createElement('script'); po.type = 'text/javascript'; po.async = true;#}
  227.                         {#po.src = 'https://apis.google.com/js/platform.js';#}
  228.                         {#var s = document.getElementsByTagName('script')[0]; s.parentNode.insertBefore(po, s);#}
  229.                         {#})();#}
  230.                         {#</script>#}
  231.                         <div class="fb-share-button"
  232.                              data-href="{{ path(app.request.attributes.get('_route'), app.request.attributes.get('_route_params')) }}"
  233.                              data-layout="button"></div>
  234.                         <div class="spacer">&nbsp;</div>
  235.                         <!-- twitter share -->
  236.                         <a class="twitter-share-button" target="_blank"
  237.                            href="https://twitter.com/intent/tweet?url={{ app.request.uri }}">
  238.                             <div class="u-display--inlineblock">
  239.                                 <div class="o-media__img u-margin-right-tiny">
  240.                                     <img src="{{ asset('/assets/images/icons/social/x-share-button-icon-not.svg') }}" alt="X Share" title="X Share" height="25" width="64" class="c-social--color"/>
  241.                                 </div>
  242.                             </div>
  243.                         </a>
  244.                         <div class="spacer">&nbsp;</div>
  245.                         <!-- google plus -->
  246.                         <!-- Plaats deze tag waar je de +1 knop wilt weergeven. -->
  247.                         <div class="g-plusone" data-annotation="inline" data-width="120"></div>
  248.                         <div class="cleaner">&nbsp;</div>
  249.                     </article>
  250.                     <article class="no-border">
  251.                         <div class="prevnext-pages">
  252.                             {% if subsiteslug != '' %}
  253.                                 <a href="{{ path('notaris_frontend_subsite_news', {'subsiteslug':subsiteslug}) }}"
  254.                                    title="{{ 'nw_terugnaarlijst' | trans }}">{{ 'nw_terugnaarlijst' | trans }}</a>
  255.                             {% else %}
  256.                                 <a href="{{ path('notaris_frontend_news') }}"
  257.                                    title="{{ 'nw_terugnaarlijst' | trans }}">{{ 'nw_terugnaarlijst' | trans }}</a>
  258.                             {% endif %}
  259.                         </div>
  260.                         <!--<p><img src="/imgs/ic_pm.gif" alt="offici&euml;le Persmededeling" class="ic-pm" /> = Persmededeling</p>-->
  261.                     </article>
  262.                     <div class="cleaner">&nbsp;</div>
  263.                 </div>
  264.             </section>
  265.             {# dynamische cms modules #}
  266.             {#{{ include('@NotarisFrontend/Module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}#}
  267.         </div>
  268.         <!-- #### CONTENT #### -->
  269.         {#
  270.         <aside id="content-right">
  271.            {% if notaryId is defined %}
  272.                {{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
  273.            {% else %}
  274.                {{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
  275.            {% endif %}
  276.            <p id="persmededeling"><span class="pm-label">{{ 'nw_pm' | trans }}</span> {{ 'nw_persmed' | trans }}</p>
  277.            <div class="cleaner">&nbsp;</div>
  278.         </aside>
  279.         #}
  280.         {% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': 'slg_nieuws' | trans, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
  281.     </section>
  282. {% endblock %}
  283. {% block extrajs %}
  284.     <script>
  285.         // $.cookie('cookie-settings-statistics') === 'true' && applyAnalyticsJs();
  286.         // $.cookie('cookie-settings-social') === 'true' && applySocialJs();
  287.     </script>
  288.     <script type="application/ld+json">
  289.         {
  290.             "@context": "https://schema.org",
  291.             "@type": "NewsArticle",
  292.             "headline": "{{- newsitem.title -}}",
  293.             {% if newsitem.asset is not null -%}
  294.                 {%- if newsitem.asset.assetImages is not null -%}
  295.                     {%- if newsitem.asset.assetImages | length == 1 and newsitem.text != '' -%}
  296.                         {%- set image = newsitem.asset.assetImages[0] -%}
  297.                         {%- set image_path = app.request.schemeAndHttpHost ~ '/uploads/'~ image.image.locale ~ image.image.filename -%}
  298.             "image": [
  299.                 "{{- image_path  -}}"
  300.             ],
  301.             {% endif -%}
  302.         {%- endif -%}
  303.     {%- endif -%}
  304.             "datePublished": "{{- newsitem.publicationDate | date('Y-m-d') -}}",
  305.             "dateModified": "{{ newsitem.publicationDate | date('Y-m-d') }}"
  306.             {% if newsitem.source != '' -%}
  307.             ,"author": {
  308.                 "@type": "Organization",
  309.                 "name": "{{- newsitem.source -}}"
  310.             }
  311.         {% endif -%}
  312.         }
  313.     </script>
  314. {% endblock %}
  315. {% block extracss %}
  316.     <style>
  317.         .img-full-width, .img-full-width img {
  318.             width: 100%;
  319.         }
  320.     </style>
  321. {% endblock %}