<p>Working with Craft 2, I have a channel for events that each entry has an expiration date. Live entries should show the upcoming event info and expired entries should show archive info. </p>

<p>I have created a costume route to enable viewing of the expired entries:</p>

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

<p>when I am adding this to the code:</p>

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

<p>I can see the expired entries info but than if I am viewing a live entry, the data that I am viewing is not from the entry I am visiting but from the first entry in the section. If I drop this line from my code, than I cannot see the info from the expired entries. </p>

<p>Is there a way to be able to view both?</p>

CC BY-SA 4.0
2018-10-08T19:22:53.990Z
Is it for Craft 2 or Craft 3?
Robin Schambach
CC BY-SA 4.0
2018-10-09T05:36:00.703Z
I am working with Craft 2
LessMore Creative Studio
<entries><status><expiration>
Viewing expired entries and live one with the same template
# Viewing expired entries and live one with the same template

(Asked by: username_0 on 2018-10-08)

Working with Craft 2, I have a channel for events that each entry has an expiration date. Live entries should show the upcoming event info and expired entries should show archive info. 
I have created a costume route to enable viewing of the expired entries:
news/{slug} →  news/_entry

when I am adding this to the code:
{% set entry = craft.entries.section('news').slug(slug).status('live, expired').first() %}

I can see the expired entries info but than if I am viewing a live entry, the data that I am viewing is not from the entry I am visiting but from the first entry in the section. If I drop this line from my code, than I cannot see the info from the expired entries. 
Is there a way to be able to view both?

**Tags:** entries, status, expiration

> **Comments:**
> **username_1**: Is it for Craft 2 or Craft 3?  
> **username_0**: I am working with Craft 2  

---

## 0 answers

