{% if block.title is defined and block.title is not empty %}
    <h2 property='title'>{{ block.title }}</h2>
{% endif %}
{% set element = (element is defined) ? element : 'h2' %}
{% if block.title is defined and block.title is not empty %}
    <{{ element }} property='title'>{{ block.title }}</{{ element }}>
{% endif %}

Allow to change the title tag
Allow to change the title tag

This will allow to use the same twig for h3 and so on
