I've added an expire function for the entries so that they will not show if the date has expired. This works just fine, but I'm trying to add more function to it so that it will show entries when it comes to a date.
But I can't get this to work..
The code for the expiry function I got from the embargo/expire module.
Here's what I have so far:
function ExpiresDoNotShow() {
if (Director::urlParam('Action') && Director::urlParam('Action') != "tag" ) {
return true;
}
$now = strtotime('now');
if($this->owner->Date && strtotime($this->owner->Date) > $now) {
return false;
} elseif($this->owner->DateOut && strtotime($this->owner->DateOut) < $now) {
return false;
} else {
return true;
}
}
If I remove else return true, nothing outputs.
When true is set the entries that doesn't have expired shows.
Need some help with this.
Thanks.