src/Notaris/FrontendBundle/Resources/views/faq/detail.html.twig line 1

Open in your IDE?
  1. {% extends '@NotarisFrontend/layout2017.html.twig' %}
  2. {% if notaryId is defined %}
  3.     {% set headTitle = info.header1  | replace({"<BR />":" "}) ~ ' - ' ~  subsite.pageTitle %}
  4. {% else %}
  5.     {% set headTitle = faq.title ~ ' | ' ~ 'alg_basetitle_nondash' | trans ~  ' - FAQ ' %}
  6. {% endif %}
  7. {% block title %}
  8.     <title>{{ headTitle }}</title>
  9. {% endblock %}
  10.  {% if subsite.slug == 'faq' %}
  11.      {% if locale == 'nl' %}
  12.          {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_faq_subsite_detail', {subsiteSlug: 'algemeen', faqSlug: faq.slug}) %}
  13.      {% else %}
  14.          {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_faq_subsite_detail', {subsiteSlug: 'generales', faqSlug: faq.slug}) %}
  15.      {% endif %}
  16.  {% else %}
  17.      {% set canonicalLink = url_scheme ~ '://www.' ~ _context['url_' ~ locale] ~ path('notaris_frontend_faq_subsite_detail', {subsiteSlug: subsite.slug, faqSlug: faq.slug}) %}
  18.  {% endif %}
  19. {% block extralinks %}
  20.     <link rel="canonical" href="{{ canonicalLink }}"  />
  21. {% endblock %}
  22. {% set linked_url_nl = url_nl ~ path('notaris_frontend_faq') %}
  23. {% set linked_url_fr = url_fr ~ path('notaris_frontend_faq') %}
  24. {% block extrameta %}
  25.     {{ parent() }}
  26.     {#<meta name="description" lang="{{ locale }}" content="{{ subsite.meta.metaDescription }}"/>#}
  27.     {% if faq.meta.metaDescription != '' %}
  28.         <meta name="description" lang="{{ locale }}" content="{{ faq.meta.metaDescription }}"/>
  29.     {% else %}
  30.         <meta name="description" lang="{{ locale }}" content="{{ subsite.meta.metaDescription }}"/>
  31.     {% endif %}
  32.     {% if faq.meta.metaKeywords != '' %}
  33.         <meta name="keywords" lang="{{ locale }}" content="{{ faq.meta.metaKeywords }}"/>
  34.     {% else %}
  35.         <meta name="keywords" content="{{ subsite.meta.metaKeywords }}"/>
  36.     {% endif %}
  37.     <meta property="og:title" content="{{ faq.title }}" />
  38.     <meta property="og:type" content="website" />
  39.     <meta property="og:url" content="{{ canonicalLink }}" />
  40.     {% if faq.meta.ogDescription != '' %}
  41.         <meta property="og:description" content="{{ faq.meta.ogDescription }}" />
  42.     {% else %}
  43.         <meta property="og:description" content="{{ subsite.meta.ogDescription }}" />
  44.     {% endif %}
  45. {% endblock %}
  46. {% block body %}
  47.     <section class="content u-padding-top-large">
  48.         {% if smallsidenav %}
  49.             {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite, 'smallsidenav': smallsidenav }) }}
  50.         {% else %}
  51.             {{ include('@NotarisFrontend/module/sidenav.html.twig', {'subsite': subsite }) }}
  52.         {% endif %}
  53.         <div id="content-center" class="content-center-large {{ subsite.stylesheet }}">
  54.             <div id="content-center-header">
  55.                 <div class="prevnext-pages prevnext-pages-color border-bottom">
  56.                     {% if subsite.slug != '' and subsite.slug != 'faq' and subsite.slug != 'mybox' %}
  57.                         {#% if subsite.slug == 'faq' and locale == 'nl' %}
  58.                             {% set subsiteslug = 'algemeen' %}
  59.                         {% elseif subsite.slug == 'faq' and locale == 'fr' %}
  60.                             {% set subsiteslug = 'generales' %}
  61.                         {% else %}
  62.                             {% set subsiteslug = subsite.slug %}
  63.                         {% endif %#}
  64.                        <a href="{{ path('notaris_frontend_faq_subsite', {'subsiteSlug': subsite.slug}) }}" title="{{ 'faq_vragenover' | trans }} {{ subsite.name }}">{{ 'faq_vragenover' | trans }} <strong>{{ subsite.name }}</strong></a> ({{ faqcount }})
  65.                     {% else %}
  66.                        <a href="{{ path('notaris_frontend_faq') }}" title="{{ 'faq_vragenover' | trans }} {{ subsite.name }}">{{ 'faq_vragenover' | trans }} <strong>{{ subsite.name }}</strong></a> ({{ faqcount }})
  67.                     {% endif %}
  68.                 </div>
  69.             </div>
  70.             <section id="info">
  71.                 <div id="info-content" class="niveau1">
  72.                     <article class="u-padding-bottom-cstm">
  73.                         {# <h3><span>{{ faqindex }}</span> <strong>{{ faq.title }}</strong></h3>  @TODO IONEL: SEO h1 #}
  74.                         <span class="u-margin-right-tiny u-display--inline s-cstm-settsp">{{ faqindex }}</span>
  75.                         <h1 class="u-margin-top-none u-display--inline s-cstm-setth1">{{ faq.title }}</h1>
  76.                     </article>
  77.                     {% set showCaption = '' %}
  78.                     {% if faq.asset and (faq.asset.assetImages | length > 0) %}
  79.                             {% for image in faq.asset.assetImages %}
  80.                                 <img src="/uploads/{{ image.image.locale }}{{ image.image.filename }}" title="{{ image.image.caption }}" alt="{{ image.image.alt }}" style="margin-top: 20px;" />
  81.                                 {% if image.image.caption %}
  82.                                     {% set showCaption = image.image.caption %}
  83.                                 {% endif %}
  84.                             {% endfor %}
  85.                     {% endif %}
  86.                     <article>
  87.                         {% if showCaption != '' %}
  88.                             <p style="color: #979797">{{ showCaption }}</p>
  89.                         {% endif %}
  90.                         {% if faq.subtitle %}
  91.                         <h2 class="faq-title"><strong>{{ faq.subtitle }}</strong></h2>
  92.                         {% endif %}
  93.                         {% if faq.answer %}
  94.                         {#<h3>{{ faq.answer | raw }}</h3>#}
  95.                         {{ faq.answer | replace({'<p>': '<h3 class="faq-title">', '</p>': '</h3>'}) | raw}}
  96.                         {% endif %}
  97.                     </article>
  98.                     {% if faq.asset and (faq.asset.assetLinks | length > 0 or faq.asset.assetAttachments | length > 0) %}
  99.                         <article>
  100.                             <ul>
  101.                                 {% for link in faq.asset.assetLinks %}
  102.                                     <li><a href="{{ link.link.url }}" title="{{ link.link.title }}" {% if link.link.newWindow %}target="_blank"{% endif %}>{{ link.link.title }}</a></li>
  103.                                 {% endfor %}
  104.                                 {% for attachment in faq.asset.assetAttachments %}
  105.                                     {% set fileType = attachment.attachment.filename | split('.') %}
  106.                                     {% set fileType = fileType | last | upper %}
  107.                                     {% set title = attachment.attachment.title %}
  108.                                     {% if title == '' %}
  109.                                         {% set title = attachment.attachment.originalFilename %}
  110.                                     {% endif %}
  111.                                     {% set foo = attachment.attachment.filename|split('/', 2) %}
  112.                                     {% if foo | length >= 1 %}{% set filename = foo[1] %}{% endif %}
  113.                                     {%  if filename is defined %}
  114.                                     <li><a href="/download/{{ filename | url_encode }}" title="{{ title }}">{{ title }} ({{ fileType  }} / {{ attachment.attachment.byte | bfos_format_bytes | replace({'.':','}) }})</a></li>
  115.                                     {% endif %}
  116.                                 {% endfor %}
  117.                             </ul>
  118.                         </article>
  119.                     {% endif %}
  120.                     {% if faq.tags | length > 0 %}
  121.                         <div class="c-tags u-padding-small js-tags">
  122.                             {% for tag in faq.tags %}
  123.                                 <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"><small>{{ tag.name }}</small></a>
  124.                             {% endfor %}
  125.                         </div>
  126.                     {% endif %}
  127.                     <article class="no-border">
  128.                         <div class="prevnext-pages prevnext-pages">
  129.                             <a href="{{ backlink }}">{{ 'terugnaarlijst' | trans }}</a>
  130.                         </div>
  131.                     </article>
  132.                 </div>
  133.                 {# dynamische cms modules #}
  134.                 {{ include('@NotarisFrontend/module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
  135.             </section>
  136.         </div>
  137.         {#<aside id="content-right">
  138.             {% if notaryId is defined %}
  139.                 {{ include('@NotarisFrontend/Sven/_sven_address.html.twig') }}
  140.             {% else %}
  141.                 {{ include('@NotarisFrontend/Module/notsearch_module.html.twig') }}
  142.             {% endif %}
  143.             {{ include('@NotarisFrontend/Module/Side/brochure.html.twig', {'hideDesktop': false, 'subsite': subsite.slug}) }}
  144.             {{ include('@NotarisFrontend/Module/mod_cms.html.twig', {'rightmodules': rightmodules }) }}
  145.         </aside>#}
  146.         {% include '@NotarisFrontend/navigation/mobilesubnav.html.twig' with {'websiteSlug': subsite.slug, 'isSven':false, 'isHome':false, 'subsite': subsite} %}
  147.     </section>
  148. {% endblock %}
  149. {% block extrajs %}
  150.     <script type="application/ld+json">
  151.         {
  152.             "@type": "Question",
  153.             "name": "{{ faq.title }}",
  154.             "acceptedAnswer": {
  155.                 "@type": "Answer",
  156.                 "text": "{{ cleanDescription | raw }}"
  157.             }
  158.         }
  159.     </script>
  160. {% endblock %}