I have manage to make the blog entries with expiry date. This works just fine, but I have another little problem now. When I use the archive the entries doesn't show because the date on those have expired.
Any ideas on how this can be solved.
Heres the code for the expire date..
In BlogEntires.php
function ExpiresDoNotShow() {
$now = strtotime('now');
if($this->owner->DateOut && strtotime($this->owner->DateOut) < $now) {
return false;
} else {
return true;
}
}
In BlogSummary.ss
<% if ExpiresDoNotShow %>...<% end_if %>
Add this in the function ExpiresDoNotShow
if (Director::urlParam('Action') && Director::urlParam('Action') != "tag" ) {
return true;
}