templates/blocks/custom_title_blocks.html.twig line 1

Open in your IDE?
  1. {#
  2.     {
  3.         "key": "custom_title_blocks",
  4.         "category": "Framework",
  5.         "label": "Titel langszij content",
  6.         "description": "...",
  7.         "allowMove": false,
  8.         "blocks": [
  9.             {
  10.                 "key": "block-0",
  11.                 "size": 4,
  12.                 "buttons": true,
  13.                 "required": "none",
  14.                 "fields": [
  15.                     {
  16.                         "key": "title",
  17.                         "type": "text",
  18.                         "label": "Subtitel"
  19.                     },
  20.                     {
  21.                         "key": "title2",
  22.                         "type": "textarea",
  23.                         "label": "Titel"
  24.                     },
  25.                     {
  26.                         "key": "text",
  27.                         "type": "textarea",
  28.                         "label": "Tekst"
  29.                     }
  30.                 ]
  31.             },
  32.             {
  33.                 "key": "block-1",
  34.                 "size": 8,
  35.                 "buttons": true,
  36.                 "contained": "right",
  37.                 "required": "media",
  38.                 "fields": [
  39.                     {
  40.                         "key": "title",
  41.                         "type": "text",
  42.                         "label": "Titel"
  43.                     },
  44.                     {
  45.                         "key": "text",
  46.                         "type": "textarea",
  47.                         "label": "Tekst"
  48.                     }
  49.                 ]
  50.             }
  51.         ]
  52.     }
  53. #}
  54. <section
  55.   class="text-blocks {{wrapper.cssClass is defined ? wrapper.cssClass : ''}}"
  56.   id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
  57.   style="{% if wrapper.bgColor %}background-color: {{wrapper.bgColor}};{% endif %}"
  58. >
  59.   <div class="container">
  60.     <div class="row">
  61.       <div class="col-sm-12 col-lg-4">
  62.         <div class="titles">
  63.           {% if firstBlock.config.title %}
  64.             <h3>{{firstBlock.config.title}}</h3>
  65.           {% endif %}
  66.           {% if firstBlock.config.title2 %}
  67.           <div class="maintitle">
  68.             {{firstBlock.config.title2|raw}}
  69.           </div>
  70.           {% endif %}
  71.           {% if firstBlock.config.text %}
  72.           <div class="content">
  73.             {{firstBlock.config.text|raw}}
  74.           </div>
  75.           {% endif %}
  76.           {% if firstBlock.config.buttons is defined %}
  77.             <div class="btns d-none d-lg-block">
  78.               {% for button in firstBlock.config.buttons %}
  79.                 <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn btn-blank {{button.class}}">
  80.                   {{button.label}}
  81.                 </a>
  82.               {% endfor %}
  83.             </div>
  84.           {% endif %}
  85.         </div>
  86.       </div>
  87.       <div class="col-sm-12 col-lg-8">
  88.         {% if blocks[1] is iterable %}
  89.           <div class="block">
  90.             <div class="content">
  91.               {% if wrapper.blocks[1].config.title is not empty %}
  92.                 <h3>{{wrapper.blocks[1].config.title|raw}}</h3>
  93.               {% endif %}
  94.               {{wrapper.blocks[1].config.text|raw}}
  95.               {% if wrapper.blocks[1].config.buttons is defined %}
  96.                 {% for button in wrapper.blocks[1].config.buttons %}
  97.                   <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="{{button.class}}">
  98.                     {{button.label}}
  99.                     <i class="fa fa-angle-right"></i>
  100.                   </a>
  101.                 {% endfor %}
  102.               {% endif %}
  103.             </div>
  104.           </div>
  105.         {% else %}
  106.           {% if 'contained:' in blocks[1] %}
  107.             {% set containmentKey = (blocks[1] | replace({'contained:': ''})) %}
  108.             {% if containments[containmentKey] is iterable %}
  109.               {% for cBlock in containments[containmentKey] %}
  110.                 <div class="block">
  111.                   <div class="content">
  112.                     {% if cBlock.media is not empty %}
  113.                     <div class="row text-center text-lg-start">
  114.                       <div class="col-12 col-lg-3">
  115.                         <div class="image mb-3 mb-lg-0">
  116.                           <img src="/{{cBlock.media.getWebPath}}"/>
  117.                         </div>
  118.                       </div>
  119.                       <div class="col-12 col-lg-9">
  120.                       {% endif %}
  121.                         {% if cBlock.config.title is not empty %}
  122.                           <h3>{{cBlock.config.title|raw}}</h3>
  123.                         {% endif %}
  124.                         {{cBlock.config.text|raw}}
  125.                       {% if cBlock.media is not empty %}
  126.                       </div>
  127.                     </div>
  128.                     {% endif %}
  129.                     {% if cBlock.config.buttons is defined %}
  130.                       {% for button in cBlock.config.buttons %}
  131.                         <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="{{button.class}}">
  132.                           {{button.label}}
  133.                           <i class="fa fa-angle-right"></i>
  134.                         </a>
  135.                       {% endfor %}
  136.                     {% endif %}
  137.                   </div>
  138.                 </div>
  139.               {% endfor %}
  140.             {% endif %}
  141.           {% else %}
  142.             {# Something strange happened #}
  143.           {% endif %}
  144.         {% endif %}
  145.       </div>
  146.     </div>
  147.     {% if firstBlock.config.buttons is defined %}
  148.       <div class="btns text-center d-lg-none">
  149.         {% for button in firstBlock.config.buttons %}
  150.           <a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn btn-blank {{button.class}}">
  151.             {{button.label}}
  152.           </a>
  153.         {% endfor %}
  154.       </div>
  155.     {% endif %}
  156.   </div>
  157. </section>