{% if breadcrumbs is defined %}
{% if caseStudy is defined %}
{% set titleBgImg = caseStudy.getFeaturedImage() ? ' style=background-image:url(' ~ caseStudy.getFeaturedImage().getThumbnail('hero') ~ ');' : '' %}
{% endif %}
{% if blogPost is defined %}
{% set blogPostBgImg = blogPost.getFeaturedImage() ? ' style=background-image:url(' ~ blogPost.getFeaturedImage().getThumbnail('hero') ~ ');' : '' %}
{% endif %}
{% set altLayout = document.getProperty('alt_page_layout') %}
{% set hideTitle = document.getProperty('hide_title') %}
{% set pageIntro = document.getProperty('page_intro') %}
{% set objectIntro = torqService is defined ? torqService.getIntroTitle() : solution is defined ? solution.getIntroTitle() : '' %}
<section class="{% if not altLayout %}title-container {% endif %}{% if altLayout %}top-padding {% endif %}position-relative{% if caseStudy is defined %} case-study-title{% endif %}{% if blogPost is defined %} blog-post-title{% endif %}"{% if caseStudy is defined %}{{ titleBgImg }}{% elseif blogPost is defined %}{{ blogPostBgImg }}{% endif %}>
{% if not altLayout %}
<div class="inner top-padding bottom-padding-4em">
{% if breadcrumbs|length > 1 %}
<div class="breadcrumbs{% if (not hideTitle) or (not altLayout) %} bottom-margin-2em{% endif %}{% if caseStudy is defined %} case-study-breadcrumbs{% endif %}">
{% for breadcrumb in breadcrumbs %}
{% if loop.last %}
{{ breadcrumb['title'] }}
{% else %}
<a href="{{ breadcrumb['route'] }}">{{ breadcrumb['title'] }}</a>
/
{% endif %}
{% endfor %}
</div>
{% endif %}
{% if (not hideTitle) and (blogPost is not defined) and (caseStudy is not defined) and (torqService is not defined) and (solution is not defined) %}
<h1>{% if pageIntro %}{{ pageIntro }}{% else %}{{ breadcrumbs|last['title'] }}{% endif %}</h1>
{% elseif (not hideTitle) and (blogPost is defined) or (caseStudy is defined) or (torqService is defined) or (solution is defined) %}
<h1{% if caseStudy is defined %} class="case-study-breadcrumbs-title"{% elseif (torqService is defined) or (solution is defined) %} class="service-breadcrumbs-title"{% endif %}>{% if objectIntro %}{{ objectIntro }}{% elseif caseStudy is defined %}{{ caseStudy.getDescriptionTitle() }}{% else %}{{ breadcrumbs|last['title'] }}{% endif %}</h1>
{% endif %}
{% if blogPost is defined %}
{% set author = blogPost.getAuthor() %}
{% set blogDate = blogPost.getDate().format('F j, Y') %}
<p class="meta--date">{% if author %}{{ author.Name }} | {% endif %}{{ blogDate }}</p>
{% endif %}
</div>
{% else %}
<div class="inner top-padding-3em">
{{ include('content/includes/parts/breadcrumbs.html.twig') }}
</div>
{% endif %}
</section>
{% endif %}