src/Elements/Bundle/DemiFrontendBundle/Resources/views/Infrastructure/detail/additionalDescriptions.html.twig line 1

Open in your IDE?
  1. {#
  2. /**
  3.  * @var \Pimcore\Templating\PhpEngine this
  4.  * @var \Pimcore\Templating\PhpEngine view
  5.  * @var \Pimcore\Templating\GlobalVariables app
  6.  * #
  7.  * @var detailHeadline string
  8.  * @var detailOfferBadge string optional
  9.  * @var moreDescriptions array optional
  10.  */
  11. #}
  12. <section class="demi-event-detail-content-block demi-event-detail-content-block--contact">
  13.     <div class="container">
  14.         {% set hasMoreDescriptions = moreDescriptions is defined and moreDescriptions | length > 0 %}
  15.         {% set hasLocalDescriptions = localDescriptions is defined and localDescriptions | length > 0 %}
  16.         {% if hasMoreDescriptions or hasLocalDescriptions %}
  17.             <div class="wysiwyg">
  18.                 {% if hasMoreDescriptions %}
  19.                     <h3 class="js-toc__title event__hl">{{ detailHeadline }}</h3>
  20.                     <div class="">
  21.                         {% for type in demi_infrastructureGetSortedDescriptionTypes | filter (type => type in moreDescriptions) %}
  22.                             {% set tk = 'demi.infrastructure.detail.' ~ demi_getValidFileName(type) %}
  23.                             <div class="my-4">
  24.                                 <h4 class="mb-2">
  25.                                     {{ tk | trans }}
  26.                                 </h4>
  27.                                 <div>
  28.                                     <div class="wysiwyg">{{ infrastructure.getDescription(type, app.request.getLocale()) | raw }}</div>
  29.                                 </div>
  30.                             </div>
  31.                         {% endfor %}
  32.                     </div>
  33.                 {% endif %}
  34.                 {% if hasLocalDescriptions %}
  35.                     <div class="">
  36.                         {% for description in localDescriptions %}
  37.                             {% set tk = ('demi.infrastructure.detail.' ~ description.getProperty("demi_descriptionType")) | lower %}
  38.                             <div class="my-4">
  39.                                 <h4 class="mb-2">
  40.                                     {{ tk | trans }}
  41.                                 </h4>
  42.                                 <div>
  43.                                     <div class="wysiwyg">{{ description.getText() | raw }}</div>
  44.                                 </div>
  45.                             </div>
  46.                         {% endfor %}
  47.                     </div>
  48.                 {% endif %}
  49.             </div>
  50.         {% endif %}
  51.     </div>
  52. </section>