views:

161

answers:

1

I am using the following within the exp:weblog:entries tag:

start_on="{current_time format='%Y-%m-%d %H:%i'}"

I want to use this so that when the date of an event is past the current date then the event will disappear from the page. The problem is that I have some events that only have an entry date (ex. April 04, 2009) and others that have an entry date as well as an expired date (ex. January 1, 2009 - July 31, 2009). When I put in the “start_on” code, the event for April disappears, which is what I want it to do, but the January-July event also disappears since the current date is past the entry date of January, but I want that event to stay up until it’s expired date until July 31. Is there any way of going about that?

A: 

You could use

{if ""!=expiration_date AND current_time<expiration_date}
...blog...
{if:elseif ""==expiration_date}
...blog...
{/if}
Robert