diff --git a/bakerydemo/templates/search/search_results.html b/bakerydemo/templates/search/search_results.html index 90252e9..0a7ad37 100644 --- a/bakerydemo/templates/search/search_results.html +++ b/bakerydemo/templates/search/search_results.html @@ -1,5 +1,5 @@ {% extends "base.html" %} -{% load wagtailcore_tags wagtailimages_tags %} +{% load wagtailcore_tags wagtailimages_tags wagtailsearchpromotions_tags %} {% block title %}Search{% if search_results %} results{% endif %}{% if search_query %} for “{{ search_query }}”{% endif %}{% endblock %} @@ -39,7 +39,40 @@ {% endfor %} {% elif search_query %} -
No results found for “{{ search_query }}”.
+ {% get_search_promotions search_query as search_promotions %} + {% if search_promotions %} +You searched for “{{ search_query }}”, {{ search_promotions|length }} result{{ search_promotions|length|pluralize }} found.
++ {% if search_promotion.page.specific.content_type.model == "blogpage" %} + Blog Post + {% elif search_promotion.page.specific.content_type.model == "locationpage" %} + Location + {% else %} + Bread + {% endif %} +
++ {% if search_promotion.page.specific.search_description %}{{ search_promotion.page.specific.search_description|richtext }}{% endif %} +
+No results found for “{{ search_query }}”.
+ {% endif %} {% else %}You didn't search for anything!
{% endif %}