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

Open in your IDE?
  1. {% set headlineTag = pimcore_select('headline1', {
  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('h2') %}
  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 <strong>oben</strong> wählen:</p>
  27.                         {{ pimcore_select("MarginTop", {
  28.                             "reload": true,
  29.                             "store": [
  30.                                 ["regularMT", "Normal"],
  31.                                 ["halfMT", "1/2"],
  32.                                 ["smallMT", "1/4"],
  33.                                 ["zeroMT", "kein Abstand"],
  34.                             ],
  35.                             "defaultValue" : "zeroMT"
  36.                         }) }}
  37.                     </div>
  38.                     <div class="item">
  39.                         <p class="edit-p">Abstand nach <strong>unten</strong> wählen:</p>
  40.                         {{ pimcore_select("MarginBottom", {
  41.                             "reload": true,
  42.                             "store": [
  43.                                 ["regular", "Normal"],
  44.                                 ["half", "1/2"],
  45.                                 ["small", "1/4"],
  46.                                 ["zero", "kein Abstand"],
  47.                             ],
  48.                             "defaultValue" : "regular"
  49.                         }) }}
  50.                     </div>
  51.                     <div class="item">
  52.                         <p class="edit-p">Titel-Typ definieren:</p>
  53.                         {{ headlineTag|raw }}
  54.                     </div>
  55.                 </div>
  56.             </div>
  57.         </div>
  58.     </div>
  59. {% endif %}
  60. <section class="headline-text {{ pimcore_select('MarginTop').getData() }} {{ pimcore_select('MarginBottom').getData() }}">
  61.     <div class="container">
  62.     
  63.         {% if editmode %}
  64.             <h1 class="hero-lead">{{ pimcore_textarea("headline_h1",{
  65.                     "nl2br": true,
  66.                     "height": 200,
  67.                     "placeholder": "HAUPT ÜBERSCHRIFT FÜR DIESE AREA"
  68.                 }) }}
  69.             </h1>
  70.         {% elseif not editmode and not pimcore_textarea('headline_h1').isEmpty() %}
  71.             <{{headline1|raw}} class="hero-lead"> 
  72.                 {{ pimcore_textarea('headline_h1').getData() | nl2br }}
  73.             {{ headline2|raw }}
  74.         {% endif %}
  75.         {% if editmode %}
  76.             <div class="headline-text">
  77.                 {{ pimcore_wysiwyg('headlineText', {
  78.                     height: 300,
  79.                     customConfig: '/assets/js/editmode/config.js'
  80.                 }) }}
  81.             </div>
  82.         {% elseif not pimcore_wysiwyg('headlineText').isEmpty() %}
  83.             <div class="headline-text">
  84.                 {{ pimcore_wysiwyg('headlineText').getData() | raw }}
  85.             </div>
  86.         {% endif %}
  87.         {% if editmode %}
  88.             <div class="content-container">
  89.                 <div class="lauf">
  90.                     {{ pimcore_wysiwyg('Content', {
  91.                         height: 300,
  92.                         customConfig: '/assets/js/editmode/config.js'
  93.                     }) }}
  94.                 </div>
  95.             </div>
  96.         {% elseif not pimcore_wysiwyg('Content').isEmpty() %}
  97.             <div class="content-container">
  98.                 <div class="lauf">
  99.                     {{ pimcore_wysiwyg('Content').getData() | raw }}
  100.                 </div>
  101.             </div>
  102.         {% endif %}
  103.         {% if editmode %}
  104.             <p class="text-link" style="margin-bottom: 0;">
  105.                 {{ pimcore_link("link",{
  106.                     "required": false,
  107.                     "nl2br": true,
  108.                     "height": 30,
  109.                     "class": "button",
  110.                     "placeholder": "Button text"
  111.                 }) }}
  112.             </p>
  113.         {% elseif not editmode and not pimcore_link('link').isEmpty() %}
  114.             <a href="{{ pimcore_link('link').href }}" class="text-link button">
  115.                 <span>{{ pimcore_link('link').getText() }}</span>
  116.                 {{ include('svg/arrow-right.html.twig') }}
  117.             </a>
  118.         {% endif %}
  119.     </div>
  120. </section>