templates/includes/presse/presse-content.html.twig line 1

Open in your IDE?
  1. <section class="news-content container content-block mt-5">
  2.     <div class="row gy-5 gx-5">
  3.         <div class="col-xl-3 col-md-4">
  4.             <div class="sidebar">
  5.                 {% if object.downloads|length %}
  6.                     <h6 class="sidebar__title js-toc__title">{{ 'presse-bundle.text-overview.detail.Downloads'|trans }}</h6>
  7.                     <ul class="list-unstyled downloads">
  8.                         {% for download in object.downloads %}
  9.                             <li>
  10.                                 <a href="{{ download }}" download class="download d-flex align-items-center">
  11.                                     <span class="download__icon icon icon-download text-secondary me-2" aria-hidden="true"></span>
  12.                                     <span class="text-secondary font-bold">{{ 'presse-bundle.detail.OpenDownload'|trans }}</span>
  13.                                     <span class="text-muted ms-2 text-nowrap">({{ download.getMimetype()|split('/')|last|upper }}, {{ download.getFileSize('kb') }})</span>
  14.                                 </a>
  15.                             </li>
  16.                         {% endfor %}
  17.                     </ul>
  18.                     <hr />
  19.                 {% endif %}
  20.                 {% if object.contact and object.contact.email %}
  21.                     <div class="row gy-2">
  22.                         <h6 class="sidebar__title js-toc__title">{{ 'presse-bundle.text-overview.detail.Contact'|trans }}</h6>
  23.                         <div class="mt-3">{{ 'presse-bundle.text-overview.detail.RequestsTo:'|trans }}</div>
  24.                         <div>
  25.                             {{ cardTitle(object.contact) }}
  26.                         </div>
  27.                         <a href="mailto:{{ object.contact.email }}" class="link-with-icon text-secondary" title="mail">
  28.                             <span class="icon icon-mail icon-in-text" aria-hidden="false"></span>{{ object.contact.email }}
  29.                         </a>
  30.                     </div>
  31.                 {% endif %}
  32.             </div>
  33.         </div>
  34.         <div class="col-xl col-md-8">
  35.             {% set content = object.getContent() %}
  36.             {% if content and content.getItems() is not empty %}
  37.                 {% for block in content.getItems() %}
  38.                     {{ include(['@ElementsPresse/Includes/DetailBlocks/' ~ block.getType() ~ '.html.twig'], {'block': block}, true, true) }}
  39.                 {% endfor %}
  40.             {% endif %}
  41.         </div>
  42.         {% if object.relatedProducts|length %}
  43.             <div class="col-xl-auto col-md-12">
  44.                 <div class="product-sidebar">
  45.                     <div class="row gy-3">
  46.                         <h6 class="sidebar__title">{{ 'presse-bundle.text-overview.detail.MentionedProducts'|trans }}</h6>
  47.                         {% for product in object.relatedProducts %}
  48.                             <div class="col-xl-12 col-md-4">
  49.                                 {% if product is instanceof('\\Pimcore\\Model\\DataObject\\Product') %}
  50.                                     {% set teaserType = 'product' %}
  51.                                 {% else %}
  52.                                     {% set teaserType = product.className[:1]|lower ~ product.className[1:] %}
  53.                                 {% endif %}
  54.                                 {{ include('includes/teaser/products-teaser-'"#{teaserType}"'.html.twig', {
  55.                                     'product': product,
  56.                                 }) }}
  57.                             </div>
  58.                         {% endfor %}
  59.                     </div>
  60.                 </div>
  61.             </div>
  62.         {% endif %}
  63.     </div>
  64. </section>