Hi,
I'm sure this is a simple solution, but I have spent a long time on this and can't figure it out.
I have an old version (2.4.5) site that has a case studies section that feeds 2 most recent articles to home page.
At least it should, but it only feeds the case studies that are children of the first CasestudyHolder in the site tree.
How do I get it to list the two most recent CasestudyPage on the home page regardless of which CasestudyHolder they belong to?
function CaseStudy($num=2) {
$casestudy = DataObject::get_one("CasestudyHolder");
return ($casestudy) ? DataObject::get("CasestudyPage", "ParentID = $casestudy->ID", "Date DESC", "", $num) : false;
}
Regards,
neilos