Another question:
when using control children, the events aren't sorted by event date, but by pagetree position.
I need a function that gets all events from the past year:
public function ShowAllEventsPlease() {
$startdate = date('Y-m-d', strtotime(date('Y-m-d') . " - 1 year")));
return DataObject::get_one("Calendar")->Events(null, $startdate, null, false, 9999, null);
}
but now i get a code error, whats the correct code?