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.

All other Modules /

Discuss all other Modules here.

Moderators: martimiz, Sean, Ed, biapar, Willr, Ingo, swaiba

event calendar - listing upcoming events

Go to End

2 Posts   719 Views


Community Member, 107 Posts

22 January 2014 at 1:29am

Edited: 22/01/2014 1:30am

I am trying to listing upcoming events in file. Below is code i am using, Unfortunately it list only recurring CalendarEvent,

* Class EventsControllerExtension
class EventsControllerExtension extends Extension
* @param $limit
* @return mixed

public function MyUpcomingEvents($limit){
return Calendar::get()->First()->UpcomingEvents($limit);


-- config.php --

if (class_exists('ContentController')) {
Object::add_extension('ContentController', 'EventsControllerExtension');

--- ---------

<% loop $MyUpcomingEvents(2) %>

<a href="$Link" title"$Title">$Title - $StartDate</a>

<% end_loop %>


Could somehelp me to list both non-recurring and recurring events.


Community Member, 107 Posts

24 January 2014 at 4:21pm

Edited: 26/01/2014 4:32pm

oops, i have not set end date for the non recurring events. :D

Events are listing in footer now. Thanks Uncle Cheese for calendar event.