Skip to content

Commit

Permalink
fix: Return only live pages from search promotions (#533)
Browse files Browse the repository at this point in the history
Fixes #532
  • Loading branch information
kesara authored Jan 21, 2025
1 parent 3c37e63 commit cd36a6a
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions ietf/search/templates/search/search.html
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,21 @@ <h1>Search results for {{ current_site.hostname }}</h1>
<h2 class="visually-hidden">Search results{% if search_query %} for "{{ search_query }}"{% endif %}</h2>
<ul class="list-unstyled">
{% for result in search_picks %}
<li class="mb-4">
<h3 class="h5">
<a href="{% pageurl result.page %}">
{{ result.page }}
</a>
</h3>
{% if result.description %}
<p>{{ result.description|safe }}</p>
{% if result.page.live %}
<li class="mb-4">
<h3 class="h5">
<a href="{% pageurl result.page %}">
{{ result.page }}
</a>
</h3>
{% if result.description %}
<p>{{ result.description|safe }}</p>
{% endif %}
{% if result.page.search_description %}
<p>{{ result.page.search_description|safe }}</p>
{% endif %}
</li>
{% endif %}
{% if result.page.search_description %}
<p>{{ result.page.search_description|safe }}</p>
{% endif %}
</li>
{% endfor %}
</ul>
{% endif %}
Expand Down

0 comments on commit cd36a6a

Please sign in to comment.