Hi,
I've been implementing this function here successfully on mysite/code/HomePage.php:
...
function LatestNews($num=5) {
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}
...
Now, I tried to implement the same function on the HomePage.php, but instead with News from the "EventHolder":
...
function LatestEvents($num=5) {
$news = DataObject::get_one("ArticleHolder");
return ($news) ? DataObject::get("ArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
}
...
I could successfully update the database and everything seems to work, except the homepage is not being rendered anymore at all, the page says: "Sorry, there was a problem with handling your request."
Where's the mistake?
Thanks!