2.4.7 > Hi I'm using the parent-child structure to create a calendar that takes events specified by the user. So I have a calendar holder and then child calendar events. However my difficulty is only showing posts that are close to the current date as the user will input all events in one sitting thus causing my current function to only display the first 3 or last 3 events - dynamically that is showing 3 posts that are in the future from now. These posts will then change in a months time to the other events that are in the future. is it possible to use strtotime('now') and this function, replacing "StartDate ASC" with the current date and displaying future events relevant to today.
function LatestEvents($num=1) {
$news = DataObject::get_one("CalendarHolder");
return ($news) ? DataObject::get("CalendarEntry", "ParentID > 0", "StartDate ASC", "", $num) : false;
}
Any help is much appreciated