{% set prefix = prefix is defined ? prefix ~ '-' : '' %}
{% set titleTag = titleTag | default('h2') %}
{% set titleStyle = titleStyle | default('') %}
{% set subtitleTag = subtitleTag | default('h3') %}
{% set subtitleStyle = subtitleStyle | default('') %}
{% if disableTagAndStyleEditables|default(false) %}
{# hide editbox => do not completly remove the editbox, cause we use the editables for the html tags#}
<div hidden>
{% endif %}
{% embed 'global/editmode-settings.html.twig' %}
{% block additionalInfo %}
<div>
<label>
Title tag: {{ pimcore_select(prefix ~ 'title-tag', {
store: [
["h1", "h1"],
["h2", "h2"],
["h3", "h3"],
["h4", "h4"],
["h5", "h5"],
],
defaultValue: titleTag
}) }}
</label>
<label class="ml-2">
Title tag style: {{ pimcore_select(prefix ~ 'title-style', {
store: [
["", "No style"],
["h1", "h1"],
["h2", "h2"],
["h3", "h3"],
["h4", "h4"],
["h5", "h5"],
],
defaultValue: titleStyle,
reload: true
}) }}
</label>
</div>
<div>
<label>
Subtitle tag: {{ pimcore_select(prefix ~ 'subtitle-tag', {
store: [
["h2", "h2"],
["h3", "h3"],
["h4", "h4"],
["h5", "h5"],
],
defaultValue: subtitleTag
}) }}
</label>
<label class="ml-2">
Subtitle tag style: {{ pimcore_select(prefix ~ 'subtitle-style', {
store: [
["", "No style"],
["h1", "h1"],
["h2", "h2"],
["h3", "h3"],
["h4", "h4"],
["h5", "h5"],
],
defaultValue: subtitleStyle,
reload: true
}) }}
</label>
</div>
{% endblock %}
{% endembed %}
{% if disableTagAndStyleEditables|default(false) %}
</div>
{% endif %}
{% if not pimcore_input(prefix ~ 'title-block-title').empty or not pimcore_input(prefix ~ 'title-block-subtitle').empty or editmode %}
<div class="title-block {{ className | default('') }}">
{% if editmode or not pimcore_input(prefix ~ 'title-block-title').empty %}
<{{ pimcore_select(prefix ~ 'title-tag').data }} class="title-block__title js-toc__title {{ pimcore_select(prefix ~ 'title-style').data }}">{{ pimcore_input(prefix ~ 'title-block-title', { placeholder: "Title" }) }}</{{ pimcore_select(prefix ~ 'title-tag').data }}>
{% if pimcore_select(prefix ~ 'title-tag').data == "h1" and not pimcore_input(prefix ~ 'title-block-title').empty %}
{% do elements_head_title(pimcore_input(prefix ~ 'title-block-title').data) %}
{% endif %}
{% endif %}
{% if editmode or not pimcore_input(prefix ~ 'title-block-subtitle').empty %}
<{{ pimcore_select(prefix ~ 'subtitle-tag').data }} class="title-block__sub-title {{ pimcore_select(prefix ~ 'subtitle-style').data }}">{{ pimcore_input(prefix ~ 'title-block-subtitle', { placeholder: "Subtitle" }) }}</{{ pimcore_select(prefix ~ 'subtitle-tag').data }}>
{% endif %}
{% if editmode or not pimcore_wysiwyg(prefix ~ 'title-block-wysiwyg').empty %}
<div class="wysiwyg">
{{ pimcore_wysiwyg(prefix ~ 'title-block-wysiwyg') }}
</div>
{% endif %}
</div>
{% endif %}