Hello Experts,
I need help! :-) I want a DataObejctSet consisting of a specific type of pages, filtered by their id.
In other words, i want the query to return 3 pages, all of the type "WithPreviewPage", identified by their id.
The pages are of the type "WithPreviewPage" and are not necessarily children of the same page.
The below code will give me all of the pages of type "WithPreviewPage", but i don't know how to filter by ID's.
I can do DataObject::get("WithPreviewPage", "Sort = 3"); which will give me the record with the sort order 3, but as soon as i attempt to use ID i get an "Website error", no further description.
class ForsidePage_Controller extends Page_Controller {
function showPreviews() {
$records = DataObject::get("WithPreviewPage");//, $filter, $sort, $join, $limit);
print "<pre>";
print_r($records);
print "</pre>";
return ($records);
}
}
Can anyone please show me how to return the 3 pages of WithPreviewPage with the id's 8,9,10.
Thank you for your time.