Print header section only if there is no title paragraph
This commit is contained in:
parent
54f51b569b
commit
7b023112f1
1 changed files with 11 additions and 0 deletions
|
@ -22,6 +22,16 @@
|
|||
{# expected if statement would start here #}
|
||||
{% set classes = classes|merge(['is-dark']) %}
|
||||
|
||||
{% set has_title_paragraph = false %}
|
||||
{% if content.field_body_paragraph %}
|
||||
{% for paragraph in content.field_body_paragraph['#items'] %}
|
||||
{% if paragraph.entity.type.0.entity.id == 'title' %}
|
||||
{% set has_title_paragraph = true %}
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
|
||||
{% if not has_title_paragraph %}
|
||||
<section{{ attributes.addClass(classes) }}>
|
||||
{# Header hero region #}
|
||||
<div class="container">
|
||||
|
@ -30,6 +40,7 @@
|
|||
</div>
|
||||
</div>
|
||||
</section>
|
||||
{% endif %}
|
||||
|
||||
{{ content.content }}
|
||||
|
||||
|
|
Loading…
Reference in a new issue