{% extends "base.html" %} {% load wagtailcore_tags wagtailimages_tags i18n%} {% block content %} {% if search_results %} {% for page in search_results %} {% with parent_section=page.get_parent_section ancestor=page.get_parent_section.get_ancestors.last %} {% if ancestor.sectionpage.image %}
{{ancestor.title}}
{% else %}
{{parent_section.title}}
{% endif %} {% if page.title_highlight %}

{{page.title_highlight|safe}}

{% else %}

{{page.title}}

{% endif %} {% if page.subtitle_highlight or page.body_highlight %} {% if page.subtitle_highlight %}

{{page.subtitle_highlight|safe}}

{% elif page.body_highlight %}

{{page.body_highlight|safe}}

{% endif %} {% else %}

{{page.subtitle}}

{% endif %}
{% endwith %} {% endfor %} {% else %} {% endif %} {% endblock %} {% block search %} {% if search_results %} {% include "search/search_block.html" %} {% endif %} {% endblock %}