<p>I don't think you can enable the default Entry Routing for expired entries. So you need to add a custom route.</p>

<p>To keep your current URLs, try to rebuild the default Entry Route with a custom one:</p>

<p><code>news/{slug}</code>  →  <code>news/_entry</code></p>

<p>Expired entries shouldn't return 404 now any more and load your entry template. You now have to get the Entry Model manually though:</p>

<pre><code>{% set entry = craft.entries.section('news').slug(slug).status('live, expired').first() %}
</code></pre>

CC BY-SA 3.0
2015-02-18T14:33:33.230Z
Exactly what i'm doing, can extend the existing template  too which is useful. Thanks.
Sam Hibberd
CC BY-SA 3.0
2015-02-18T14:34:55.233Z
Ok, but why did you ask the question then. Seem like a solid solution, @SamHibberd?!
carlcs
CC BY-SA 3.0
2015-02-18T14:37:25.653Z
It seemed like I might be missing something, but i was wrong, the route option (which i mentioned in my post) appears to be the only way to archive this.
Sam Hibberd
CC BY-SA 3.0
2015-02-18T14:39:53.487Z
You also need to add .status('Expired') or .status(null) to your entries query to ensure that you get Expired or Any entry respectively.
Sam Hibberd
CC BY-SA 3.0
2015-02-18T14:41:23.687Z
Yeah, I also just noticed it... Wouldn't do `null` though, because this would also show a (manually) disabled entry.
carlcs
CC BY-SA 3.0
2017-04-06T12:56:55.183Z
I receive a `Variable "slug" does not exist` when using this. What am I missing?
KSPR
CC BY-SA 3.0
2017-04-06T13:30:08.077Z
Seems like you didn’t setup the route correctly @KSPR. With `{slug}` I meant the slug token in the route UI.
carlcs
CC BY-SA 3.0
2015-02-18T14:31:32.620Z
2016-02-27T02:29:29.203Z
2016-02-27T02:29:29.203Z
carlcs
<p>I have a site with 10000 events which need to expire once they have happened, the main reason for this is to keep things tidy in the CP.</p>

<p>We need users to view events that they have completed after they have expired.</p>

<p>Is there an easy way to render these entries on the front end, without creating a custom route and changing the URL??</p>

<p>Getting the listing is easy enough:</p>

<pre><code>done: user.eventsDoing.date('&lt;'~ now|date('Y-m-d') ).order('date desc').status('expired')
</code></pre>

<templating>
Is it possible to view 'Expired' entrys on the front end?
# Is it possible to view 'Expired' entrys on the front end?

(Asked by: username_0 on 2015-02-18)

I have a site with 10000 events which need to expire once they have happened, the main reason for this is to keep things tidy in the CP.
We need users to view events that they have completed after they have expired.
Is there an easy way to render these entries on the front end, without creating a custom route and changing the URL??
Getting the listing is easy enough:
done: user.eventsDoing.date('<'~ now|date('Y-m-d') ).order('date desc').status('expired')

**Tags:** templating

---

## 1 answers

### Answer by username_1 on 2015-02-18. Score: 9 | Accepted answer

I don't think you can enable the default Entry Routing for expired entries. So you need to add a custom route.
To keep your current URLs, try to rebuild the default Entry Route with a custom one:
news/{slug}  →  news/_entry
Expired entries shouldn't return 404 now any more and load your entry template. You now have to get the Entry Model manually though:
{% set entry = craft.entries.section('news').slug(slug).status('live, expired').first() %}

> **Comments:**
> **username_0**: Exactly what i'm doing, can extend the existing template  too which is useful. Thanks.  
> **username_1**: Ok, but why did you ask the question then. Seem like a solid solution, @SamHibberd?!  
> **username_0**: It seemed like I might be missing something, but i was wrong, the route option (which i mentioned in my post) appears to be the only way to archive this.  
> **username_0**: You also need to add .status('Expired') or .status(null) to your entries query to ensure that you get Expired or Any entry respectively.  
> **username_1**: Yeah, I also just noticed it... Wouldn't do `null` though, because this would also show a (manually) disabled entry.  
> **username_2**: I receive a `Variable "slug" does not exist` when using this. What am I missing?  
> **username_1**: Seems like you didn’t setup the route correctly @KSPR. With `{slug}` I meant the slug token in the route UI.  

---

