{% set suffix = suffix|default('title-block') %}
{% set titleTag = titleTag|default('h2') %}
{% set titleStyle = titleStyle|default('') %}
{% set titlePlaceholder = titlePlaceholder|default('Title') %}
{% set subtitleTag = subtitleTag|default('div') %}
{% set subtitleStyle = subtitleStyle|default('h4') %}
{% set noSubtitleGradient = noSubtitleGradient|default(false) %}
{% set subtitlePlaceholder = subtitlePlaceholder|default('Subtitle') %}
{% set introTag = introTag|default('div') %}
{% set hideIntro = hideIntro|default(false) %}
{% set introStyle = introStyle|default('') %}
{% set introBig = introBig|default(false) %}
{% set introBigStyle = introBigStyle|default('') %}
{% set seodescription = seodescription | default('') %}
{% set isBig = isBig|default(false) %}
{% set breakTitle = pimcore_checkbox('breakTitle').checked|default(false) %}
{% set className = className|default('') %}
<div class="title-block {{ className }} {{ titleTag == 'h1' ? 'title-block--main' }} {{ isBig ? 'title-block--big' }}">
{% if editmode and not isBig %}
<div class="editmode-box editmode-box--info mb-2 d-inline-block">
{{ pimcore_checkbox('breakTitle', {
label: 'Break title'
}) }}
</div>
{% endif %}
{% if editmode or not pimcore_input('subtitle' ~ suffix).isEmpty() %}
<{{ subtitleTag }} class="title-block__sub-title h4 {{ subtitleStyle }} {{ not noSubtitleGradient ? 'text-gradient-primary' }}">
{{ pimcore_input('subtitle' ~ suffix, {
placeholder: subtitlePlaceholder
}) }}
</{{ subtitleTag }}>
{% endif %}
{% if editmode or not pimcore_input('title' ~ suffix).isEmpty() or not pimcore_input('titleBold' ~ suffix).isEmpty() %}
<{{ titleTag }} class="title-block__title js-toc__title {{ titleStyle }}" tabindex="-1">
{% if editmode or not pimcore_input('titleBold' ~ suffix).isEmpty() %}
<strong class="title-block__title--bold">
{{ pimcore_input('titleBold' ~ suffix, {
placeholder: titleTag == 'h1' ? titlePlaceholder ~ ' (H1)' : titlePlaceholder
}) }}
</strong>
{% if breakTitle %}
<br>
{% endif %}
{% endif %}
{% if editmode or not pimcore_input('title' ~ suffix).isEmpty() %}
{{ pimcore_input('title' ~ suffix, {
placeholder: titleTag == 'h1' ? titlePlaceholder ~ ' (H1)' : titlePlaceholder
}) }}
{% endif %}
</{{ titleTag }}>
{% endif %}
{% if not pimcore_input('titleBold' ~ suffix).isEmpty() or not pimcore_input('title' ~ suffix).isEmpty() %}
{% do elements_head_title(pimcore_input('titleBold' ~ suffix) ~ ' ' ~ pimcore_input('title' ~ suffix)) %}
{% endif %}
{% if not hideIntro and (editmode or not pimcore_wysiwyg('intro' ~ suffix).isEmpty()) %}
{% if introBig %}
<div class="title-block__description--big {{ introBigStyle }}">
{{ pimcore_wysiwyg('introBig' ~ suffix)|raw }}
</div>
{% endif %}
<{{ introTag }} class="title-block__description wysiwyg {{ introStyle }}">
{{ pimcore_wysiwyg('intro' ~ suffix)|raw }}
</{{ introTag }}>
{% endif %}
{% if seodescription is not defined or seodescription %}
{% do elements_head_meta(pimcore_wysiwyg('intro' ~ suffix), true) %}
{% endif %}
</div>