From 9e3a2f96d7c27ac4b6cdd84d778ecf73d4aa54b7 Mon Sep 17 00:00:00 2001 From: TopDevPros <136071495+TopDevPros@users.noreply.github.com> Date: Tue, 26 Sep 2023 11:21:08 +0000 Subject: [PATCH 1/2] Add support for external links. --- bakerydemo/templates/search/search_results.html | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/bakerydemo/templates/search/search_results.html b/bakerydemo/templates/search/search_results.html index 029664126..c7f98c2e1 100644 --- a/bakerydemo/templates/search/search_results.html +++ b/bakerydemo/templates/search/search_results.html @@ -49,6 +49,7 @@

{{ result.specific }}

From 21e9cf7ddf4a605fb0c05deaa4bb09cfb22b34e7 Mon Sep 17 00:00:00 2001 From: Thibaud Colas Date: Sat, 16 Dec 2023 01:26:42 +0000 Subject: [PATCH 2/2] Reformat template --- .../templates/search/search_results.html | 66 +++++++++---------- 1 file changed, 33 insertions(+), 33 deletions(-) diff --git a/bakerydemo/templates/search/search_results.html b/bakerydemo/templates/search/search_results.html index c7f98c2e1..5e4f363b0 100644 --- a/bakerydemo/templates/search/search_results.html +++ b/bakerydemo/templates/search/search_results.html @@ -50,42 +50,42 @@

{{ result.specific }}

{% for search_promotion in search_promotions %}
  • {% if search_promotion.page %} - - {% if search_promotion.page.specific.image %} -
    - {% image search_promotion.page.specific.image fill-180x180-c100 loading="lazy" %} -
    - {% endif %} -
    -

    {{ search_promotion.page.specific }}

    -

    - {% 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 %} -

    -
    -
    + + {% if search_promotion.page.specific.image %} +
    + {% image search_promotion.page.specific.image fill-180x180-c100 loading="lazy" %} +
    + {% endif %} +
    +

    {{ search_promotion.page.specific }}

    +

    + {% 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 %} +

    +
    +
    {% else %} - +
    -
    -

    {{ search_promotion.external_link_text }}

    -

    - External link -

    -

    - {% if search_promotion.description %}{{ search_promotion.description|richtext }}{% endif %} -

    -
    -
    +
    +

    {{ search_promotion.external_link_text }}

    +

    + External link +

    +

    + {% if search_promotion.description %}{{ search_promotion.description|richtext }}{% endif %} +

    +
    + {% endif %}
  • {% endfor %}