<p>I guess I'll answer my own question. Use a conditional in search results and overwrite the value of the entry's URL:</p>

<pre><code>{% if getSection() == 'mySection' %}
  {% set entry.url = '/mySectionUrl' %}
{% endif %}
</code></pre>

CC BY-SA 4.0
2019-11-08T20:44:09.383Z
2019-11-08T20:44:09.383Z
4midori
<p>I have a few pages in my site that aggregate information, for example, a single awards page that gets all the entries in an <strong>awards</strong> channel. Single <strong>awards</strong> entries don't have their own URLs.</p>

<p>How do I handle cases like this in search results?</p>

<search><channels>
How to handle search results that point to a page of aggregated entries?
# How to handle search results that point to a page of aggregated entries?

(Asked by: username_0 on 2019-10-31)

I have a few pages in my site that aggregate information, for example, a single awards page that gets all the entries in an **awards** channel. Single **awards** entries don't have their own URLs.

How do I handle cases like this in search results?

**Tags:** search, channels

---

## 1 answers

### Answer by username_0 on 2019-11-08. Score: 1

I guess I'll answer my own question. Use a conditional in search results and overwrite the value of the entry's URL:
{% if getSection() == 'mySection' %}
  {% set entry.url = '/mySectionUrl' %}
{% endif %}


---

