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.

We're retiring the forums!

The SilverStripe forums have passed their heyday. They'll stick around, but will be read only. We'd encourage you to get involved in the community via the following channels instead:

General Questions /

General questions about getting started with SilverStripe that don't fit in any of the categories above.

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

How does Silverstripe work?

Go to End

10 Posts   1696 Views


Community Member, 77 Posts

4 June 2013 at 6:03pm

Thanks, that is very helpful.

Even though I am using 2.4 and not 3.0 I will look at for guidance on how to implement this in 2.4.

Obviously, please let me know if I have misunderstood.


Community Member, 77 Posts

5 June 2013 at 12:57am

Edited: 05/06/2013 1:26am

I think I have now finally got there.

I am using 2.4 and this is what I did.

Created the file module_calendar\code\CalendarEventExtension.php.

Placed in this file the following code.

class CalendarEventExtension extends DataObjectDecorator {

    function returnCalendarEvents(){
        return $object_set;


Added the following line to module_calendar\_config.php

#Object::add_extension('SiteTree', 'CalendarEventExtension');

(Note that this line is commented out)

Ran the following command to build the database


Uncommented the line in module_calendar\_config.php

Job done!!

On browsing the homepage of my site, calendar events now appear in the calendar area.

Although I may still not be doing things correctly, data now appears to be retrieved using code in my module which is totally segregated from other modules.

Unfortunately it has taken me several weeks to reach this point. On a brighter note this is something which I suspect I will be using a lot (if I have done things correctly) so this may be a very big milestone for me.

Go to Top