# Showing a collection item depending on a variable

**URL:** <https://community.sitejet.io/t/showing-a-collection-item-depending-on-a-variable/1494>\
**Category:** Collections\
**Tags:** cms\_collection\
**Created:** [March 1, 2022, 4:30pm UTC](https://community.sitejet.io/t/showing-a-collection-item-depending-on-a-variable/1494 "2022-03-01T16:30:34Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Mark\_Fosseprez](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/mark_fosseprez/32/58_2.png) [@Mark\_Fosseprez](https://community.sitejet.io/u/Mark_Fosseprez)\
**Post date:** [March 1, 2022, 4:30pm UTC](https://community.sitejet.io/t/showing-a-collection-item-depending-on-a-variable/1494/1 "2022-03-01T16:30:34Z")

</div>

Hi,  
I have a collection with an item for each day of the year. I would like to show in the collection container, only ‘today’s’ item. Anyone an idea what would be the easiest way to realize that?  
thanks for the help,  
Mark

---

<div class="post-metadata">

**Author:** ![Andre](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/andre/32/3459_2.png) [@Andre](https://community.sitejet.io/u/Andre)\
**Post date:** [March 3, 2022, 1:22pm UTC](https://community.sitejet.io/t/showing-a-collection-item-depending-on-a-variable/1494/2 "2022-03-03T13:22:59Z")

</div>

This might be an idea:

Try using a Date field and fill it with 365 different dates. Then set a filter to “in the past” and order by Date, descending. And limit it to 1 item.

This way, the item with the highest date in the past should be shown.

---

<div class="post-metadata">

**Author:** ![Mark\_Fosseprez](https://dub1.discourse-cdn.com/flex017/user_avatar/community.sitejet.io/mark_fosseprez/32/58_2.png) [@Mark\_Fosseprez](https://community.sitejet.io/u/Mark_Fosseprez)\
**Post date:** [March 7, 2022, 12:22pm UTC](https://community.sitejet.io/t/showing-a-collection-item-depending-on-a-variable/1494/3 "2022-03-07T12:22:18Z")

</div>

Hi André,

that would be a nice solution if the cycle would only run for one year, but the idea is to show each year the same collection item on the same day of the year. So each day has it’s item…  
So I cannot use a regular date field as, after one year, all dates are in the past 🙂
