templates/areas/downloads/view.html.twig line 1

Open in your IDE?
  1. {% set headlineTag = pimcore_select('headlineX', {
  2.     'store': [
  3.         ['none', 'none'],
  4.         ['h1', 'H1'],
  5.         ['h2', 'H2'],
  6.         ['h3', 'H3'],
  7.         ['h4', 'H4'],
  8.         ['h5', 'H5'],
  9.         ['h6', 'H6'],
  10.     ],
  11.     'defaultValue': '',
  12.     'reload': true
  13. }) %}
  14. {% if headlineTag.isEmpty() %}
  15.     {% do headlineTag.setDataFromResource('none') %}
  16. {% endif %}
  17. {% set headline1 = headlineTag.data != 'none' ? headlineTag.data|raw : 'span'|raw %}
  18. {% set headline2 = headlineTag.data != 'none' ? '</' ~ headlineTag.data|raw ~ '>' : '</span>'|raw %}
  19. {% if editmode %}
  20.     <div class="edit-box">
  21.         <h1>KONFIGURATIONEN FÜR DEN AREABRICK:</h1>
  22.         <div class="flex gap-20">
  23.             <div class="content flex column gap-20">
  24.                 <div class="content-box flex gap-20">
  25.                     <div class="item">
  26.                         <p class="edit-p">Abstand nach unten wählen:</p>
  27.                         {{ pimcore_select("MarginBottom", {
  28.                             "reload": true,
  29.                             "store": [
  30.                                 ["regular", "Normal"],
  31.                                 ["half", "1/2"],
  32.                                 ["small", "1/4"],
  33.                                 ["zero", "kein Abstand"],
  34.                             ],
  35.                             "defaultValue" : "regular"
  36.                         }) }}
  37.                     </div>
  38.                     <div class="item">
  39.                         <div class="setting select">
  40.                             <p class="edit-p">Titel-Typ definieren:</p>
  41.                             {{ headlineTag|raw }}
  42.                         </div>
  43.                     </div>
  44.                 </div>
  45.             </div>
  46.         </div>
  47.     </div>
  48. {% endif %}
  49. <section class="downloads {{ pimcore_select('MarginBottom').getData() }}">
  50.     <div class="container">
  51.         {% if editmode %}
  52.             <h2 class="headline">{{ pimcore_textarea("headline",{
  53.                     "nl2br": true,
  54.                     "height": 100,
  55.                     "class": "h2 .headline",
  56.                     "placeholder": "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"
  57.                 }) }}
  58.             </h2>
  59.         {% elseif not editmode and not pimcore_textarea('headline').isEmpty() %}
  60.         
  61.             <{{headline1|raw}} class="headline">
  62.                 {{ pimcore_textarea('headline').getData() | nl2br }}
  63.             {{ headline2|raw }}
  64.             {# <h2 class="headline">{{ pimcore_textarea('headline').getData() | nl2br }}</h2> #}
  65.         {% endif %}
  66.         {% if editmode %}
  67.             <p class="intro" style="margin-bottom: 20px;">
  68.                 {{ pimcore_textarea("intro",{
  69.                     "nl2br": true,
  70.                     "height": 50,
  71.                     "class":"intro",
  72.                     "placeholder": "Text"
  73.                 }) }}
  74.             </p>
  75.         {% elseif not editmode and not pimcore_textarea('intro').isEmpty() %}
  76.             <div class="lauf">
  77.                 <p class="intro">{{ pimcore_textarea('intro').getData() | nl2br }}</p>
  78.             </div>
  79.         {% endif %}
  80.         {% if editmode %}
  81.             <div style="height: 20px;"></div>
  82.             {{ pimcore_relations("downloadTeaser", {
  83.                 "title": "Download Objekte ablegen",
  84.                 "types": ["object"],
  85.                 "subtypes": {
  86.                     "object": ["object"]
  87.                 },
  88.                 "classes": ["Download"]
  89.             }) }}
  90.         {% else %}
  91.         <div class="downloads-teaser flex">
  92.             {% for teaser in pimcore_relations("downloadTeaser")%}
  93.                 {% if teaser.getPdf() %}
  94.                     <div class="teaser flex space-between">
  95.                         <div class="images-container">
  96.                             <a href="{{ teaser.getPdf() }}" target="_blank" class="flex link" title="Download: {{ teaser.title }}">
  97.                                 <img class="file" src="{{ asset('/assets/images/asset.svg') }}" alt="download" width="31" height="41">
  98.                                 <img class="sign" src="{{ asset('/assets/images/download-sign.svg') }}" alt="download" width="31" height="41">
  99.                                 <p class="label">{{ teaser.title }}</p>
  100.                                 <img class="arrow" src="{{ asset('assets/images/arrows/redArrow.svg') }}" alt="download" width="20" height="24">
  101.                             </a>
  102.                         </div>
  103.                     </div>
  104.                 {% endif %}
  105.             {% endfor %}
  106.         </div>
  107.         {% endif %}
  108.     </div>
  109. </section>