{% extends 'oscar/search/results.html' %}
{% load i18n ocyan_main ocyanjson %}
{% load wagtailcore_tags wagtailsearchpromotions_tags %}

{% block extrahead %}
{{ block.super }}
<link rel="search" type="application/opensearchdescription+xml" title="{% ocyanjson 'django' 'name' %}" href="{% url 'search:opensearchdescription' %}" />
{% endblock %}

{% block searchheading %}
    {% get_search_promotions search_form.q.value as search_promotions %}
    
    {% if search_promotions %}
        <h2 class="promotion_header">{% trans 'Voorgestelde pagina(s)' %}</h2>
        <ul class="list-group" id="search_promotions">
            {% for search_promotion in search_promotions %}
                <a href="{% pageurl search_promotion.page %}" class="list-group-item list-group-item-action flex-column align-items-start">
                            <aside><h5 class="mb-1">{{ search_promotion.page.title }}</h5></aside>
                            <section><p>{{ search_promotion.description }}</p></section>
                </a>
            {% endfor %}
        </ul>
    {% endif %}
{% endblock %}