{#
{
"key": "custom_title_blocks",
"category": "Framework",
"label": "Titel langszij content",
"description": "...",
"allowMove": false,
"blocks": [
{
"key": "block-0",
"size": 4,
"buttons": true,
"required": "none",
"fields": [
{
"key": "title",
"type": "text",
"label": "Subtitel"
},
{
"key": "title2",
"type": "textarea",
"label": "Titel"
},
{
"key": "text",
"type": "textarea",
"label": "Tekst"
}
]
},
{
"key": "block-1",
"size": 8,
"buttons": true,
"contained": "right",
"required": "media",
"fields": [
{
"key": "title",
"type": "text",
"label": "Titel"
},
{
"key": "text",
"type": "textarea",
"label": "Tekst"
}
]
}
]
}
#}
<section
class="text-blocks {{wrapper.cssClass is defined ? wrapper.cssClass : ''}}"
id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}"
style="{% if wrapper.bgColor %}background-color: {{wrapper.bgColor}};{% endif %}"
>
<div class="container">
<div class="row">
<div class="col-sm-12 col-lg-4">
<div class="titles">
{% if firstBlock.config.title %}
<h3>{{firstBlock.config.title}}</h3>
{% endif %}
{% if firstBlock.config.title2 %}
<div class="maintitle">
{{firstBlock.config.title2|raw}}
</div>
{% endif %}
{% if firstBlock.config.text %}
<div class="content">
{{firstBlock.config.text|raw}}
</div>
{% endif %}
{% if firstBlock.config.buttons is defined %}
<div class="btns d-none d-lg-block">
{% for button in firstBlock.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn btn-blank {{button.class}}">
{{button.label}}
</a>
{% endfor %}
</div>
{% endif %}
</div>
</div>
<div class="col-sm-12 col-lg-8">
{% if blocks[1] is iterable %}
<div class="block">
<div class="content">
{% if wrapper.blocks[1].config.title is not empty %}
<h3>{{wrapper.blocks[1].config.title|raw}}</h3>
{% endif %}
{{wrapper.blocks[1].config.text|raw}}
{% if wrapper.blocks[1].config.buttons is defined %}
{% for button in wrapper.blocks[1].config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="{{button.class}}">
{{button.label}}
<i class="fa fa-angle-right"></i>
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% else %}
{% if 'contained:' in blocks[1] %}
{% set containmentKey = (blocks[1] | replace({'contained:': ''})) %}
{% if containments[containmentKey] is iterable %}
{% for cBlock in containments[containmentKey] %}
<div class="block">
<div class="content">
{% if cBlock.media is not empty %}
<div class="row text-center text-lg-start">
<div class="col-12 col-lg-3">
<div class="image mb-3 mb-lg-0">
<img src="/{{cBlock.media.getWebPath}}"/>
</div>
</div>
<div class="col-12 col-lg-9">
{% endif %}
{% if cBlock.config.title is not empty %}
<h3>{{cBlock.config.title|raw}}</h3>
{% endif %}
{{cBlock.config.text|raw}}
{% if cBlock.media is not empty %}
</div>
</div>
{% endif %}
{% if cBlock.config.buttons is defined %}
{% for button in cBlock.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="{{button.class}}">
{{button.label}}
<i class="fa fa-angle-right"></i>
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% endfor %}
{% endif %}
{% else %}
{# Something strange happened #}
{% endif %}
{% endif %}
</div>
</div>
{% if firstBlock.config.buttons is defined %}
<div class="btns text-center d-lg-none">
{% for button in firstBlock.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != "null" %} target="{{button.target}}" {% endif %} class="btn btn-blank {{button.class}}">
{{button.label}}
</a>
{% endfor %}
</div>
{% endif %}
</div>
</section>