{#
{
"key": "framework_content_image",
"category": "02. Content",
"label": "02.03 Content with image",
"description": "Content met afbeelding",
"allowMove": true,
"blocks": [
{
"key": "block-0",
"size": 6,
"buttons": true,
"required": "none",
"fields": [
{
"key": "title",
"type": "text",
"label": "Titel"
},
{
"key": "text",
"type": "textarea",
"label": "Tekst"
}
]
},
{
"key": "block-1",
"size": 6,
"required": "media",
"fields": []
}
]
}
#}
{#
Available objects:
- page: current page
- locale: current locale
- wrapper: contains the wrapper around multiple blocks.
- firstBlock: contains the first block in the wrapper, useful when only one block is expected.
- data: contains the data as mentioned above this file
#}
<section id="{{wrapper.cssId is defined ? wrapper.cssId : ''}}" class="text-blocks {{wrapper.cssClass is defined ? wrapper.cssClass : ''}}">
<div class="container">
{% if wrapper.label or wrapper.intro is not empty %}
<div class="introblock">
{% if wrapper.label is not empty %}
<div class="introtitle">
{{wrapper.label|raw}}
</div>
{% endif %}
{% if wrapper.intro is not empty %}
<div class="introtext">
{{wrapper.intro|raw}}
</div>
{% endif %}
</div>
{% endif %}
<div class="row d-flex align-items-center">
{# WALK THROUGH EVERY BLOCK #}
{% for b in wrapper.blocks %}
{# FIND TYPE BY REQUIRED INPUT FOR BLOCK #}
{% if data.blocks_q[b.templateKey].required == 'media' %}
{# FOUND MEDIA BLOCK #}
<div class="col-sm-12 col-lg-6 h-100 image-block order-0 order-lg-1" style="background: url(/{{b.media.getWebPath}}) no-repeat center; background-size: cover;">
<img src="/{{b.media.getWebPath}}" alt="">
</div>
{% else %}
{# NO MEDIA BLOCK, MUST BE TEXT BLOCK #}
<div class="col-sm-12 col-lg-6 order-1 order-lg-0">
<div class="padder">
{% if b.config.title is not empty %}
<h3 class="title">{{b.config.title}}</h3>
{% endif %}
<p>
{{b.config.text|raw}}
</p>
{% if b.config.buttons is defined %}
{% for button in b.config.buttons %}
<a href="{{button.url}}" {% if button.target is defined and button.target != 'null' and button.target is not empty %} target="{{button.target}}" {% endif %} class="btn {{button.class}}">
{{button.label}}
<i class="fa fa-angle-right"></i>
</a>
{% endfor %}
{% endif %}
</div>
</div>
{% endif %}
{% endfor %}
</div>
</div>
</section>