Skip to main content
This site requires you to update your browser. Your browsing experience maybe affected by not having the most up to date version.
i´ve created a many-many relationship (news <-> category)
when using this code, i get all news:
$news = DataObject::get_one("NewsHolder");
return ($news) ? DataObject::get("NewsPage", "ParentID = $news->ID", "Datum DESC", "", $num) : false;,
what do i have to do, to just get all news for one category?
if the relation on category is called "news" you can simply call the related objects like: