Hi!
In my Tree I have News Section (Type:News) with some Childs (Type:ArticlePage)...
What I want to do is listing some news in the News-Page.
Is the following function within the controller section of the news.php the right approach?
First get the parent ID and then the child infos?
function LatestNews($num=3) {
$news = DataObject::get_one("News");
return ($news) ? DataObject::get("ArticlePage", "ParentID = $news->ID", "Date DESC", "", $num) : false;
When I control the function the result (e.g. $Title) is empty...
Thanks,
tom