templates/Press/articleDetail.html.twig line 1

Open in your IDE?
  1. {% extends "Layout/default.html.twig" %}
  2. {% block navigation %}
  3.     {{ include('Press/Includes/pressHeader.html.twig') }}
  4. {% endblock %}
  5. {% block content %}
  6.     {% set detailUrl = linkGenerator().generate(article) %}
  7.     {% do elements_canonical(detailUrl) %}
  8.     {% do elements_opengraph().setDescription(article.shortDescription ?: article.description) %}
  9.     {% if article.teaserImage %}
  10.         {% do elements_opengraph().addImage(article.teaserImage) %}
  11.     {% endif %}
  12.     {% do elements_head_title().setTitle(article.title, true) %}
  13.     {% do elements_head_meta().setDescription(chooseDescription(article.shortDescription, article.text), true) %}
  14.     {% if not detailUrl is same as(app.request.pathInfo) %}
  15.         {% do elements_robots().setNoIndex(true) %}
  16.     {% endif %}
  17.     {{ include('Includes/hero.html.twig', {
  18.         image: article.teaserImage
  19.     })}}
  20.     {{ include('Navigation/breadcrumb.html.twig') }}
  21.     {% set region = document.property('region') %}
  22.     {% set contactObject = null  %}
  23.     {% if article.useDefaultContactBlock %}
  24.         {% if region and region.pressContactObject %}
  25.             {% set contactObject = region.pressContactObject %}
  26.         {% elseif region and region.contactObject %}
  27.             {% set contactObject = region.contactObject %}
  28.         {% endif %}
  29.     {% endif %}
  30.     {{ include('Includes/main-title-block-with-contact.html.twig', {
  31.         title: article.title,
  32.         wysiwyg: article.shortDescription,
  33.         styleModifier: 'content-block container container-sm title-block--move-up',
  34.         contactBoxAuthor: article.author ? article.author.name : '',
  35.         contactBox: contactObject ? contactObject :  {
  36.             logo: null,
  37.             contactName: article.contactName,
  38.             street: article.street,
  39.             zip: article.zip,
  40.             city: article.city,
  41.             phone: article.phone,
  42.             fax: article.fax,
  43.             mail: article.email,
  44.             website: article.website,
  45.         },
  46.         link1: article.link1,
  47.         link2: article.link2,
  48.         link3: article.link3
  49.     }) }}
  50.     {{ include('Includes/wysiwyg-area.html.twig', {
  51.         isTitleCentered: true,
  52.         styleModifier: 'content-block js-fade-in',
  53.         hasPressButtons: true,
  54.         content: article.text,
  55.         wishlistid: article.id,
  56.         wishlistTitle: article.title,
  57.         downloadLink: article.articleDocument|default(''),
  58.         wishlistActive: article.id in activePressArticlesWishlistIds|default([]),
  59.     }) }}
  60.     {{ include('Press/Includes/pressPictureTeaserGridArea.html.twig', {
  61.         title: 'press-detail.teaser grid title'|trans,
  62.         subtitle: 'press-detail.teaser grid subtitle'|trans,
  63.         items: article.documents,
  64.     }) }}
  65. {% endblock %}
  66.     {% block javascripts %}
  67.         {% if not app.request.get('onlyInlineCss') %}
  68.         {{ include('Layout/includes/encore.html.twig', {
  69.             'staticDebugMode': staticDebugMode,
  70.             'file': 'js/press'
  71.         }) }}
  72.         {% endif %}
  73.     {% endblock %}