templates/includes/title-blocks/title-block.html.twig line 1

Open in your IDE?
  1. {% set prefix = prefix is defined and prefix != '' ? prefix ~ '-' : '' %}
  2. {% set titleTag = titleTag|default('h2') %}
  3. {% if titleTag == 'h1' and (title|default or pimcore_input(prefix ~ 'title').empty) %}
  4.     {% set headTitle = title|default ?: pimcore_input(prefix ~ 'title').data %}
  5.     {% do elements_head_title(headTitle) %}
  6. {% endif %}
  7. {% if title|default('') or topTitle|default('') or editmode or not pimcore_input(prefix ~ 'title').empty or not pimcore_input(prefix ~ 'toptitle').empty %}
  8.     <div class="title-block js-fade-in {{ isMain|default(false) ? 'title-block--main': ''}} {{ className|default('') }}">
  9.         {% if topTitle|default('') or editmode or not pimcore_input(prefix ~ 'toptitle').empty|default %}
  10.             <{{ toptitleTag|default('h3') }} {% if toptitleLink|default(false) %} href="{{ toptitleLink }}"{% endif%} class="title-block__top-title {{ toptitleStyle|default('')  }}">
  11.                 {{ topTitle|default('') ?: pimcore_input(prefix ~ 'toptitle', { 'placeholder': 'Top Title'}) }}
  12.             </{{ toptitleTag|default('h3') }}>
  13.         {% endif %}
  14.         {% if title|default('') or editmode or not pimcore_input(prefix ~ 'title').empty %}
  15.             <{{ titleTag }} class="title-block__title js-toc__title {{ titleStyle|default('') }}" tabindex="-1">
  16.                 {{ title|default('') ?: pimcore_input(prefix ~ 'title', {
  17.                     'placeholder': 'Title',
  18.                     'required': required|default(false)
  19.                 }) }}
  20.             </{{ titleTag }}>
  21.         {% endif %}
  22.     </div>
  23. {% endif %}