Jump to:

23487 Posts in 18996 Topics by 2878 members

General Questions

SilverStripe Forums » General Questions » How does Silverstripe work?

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

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

Page: 1 2
Go to End
Author Topic: 791 Views
  • simples
    Community Member
    76 Posts

    Re: How does Silverstripe work? Link to this post

    Thanks, that is very helpful.

    Even though I am using 2.4 and not 3.0 I will look at http://doc.silverstripe.org/framework/en/reference/dataextension for guidance on how to implement this in 2.4.

    Obviously, please let me know if I have misunderstood.

  • simples
    Community Member
    76 Posts

    Re: How does Silverstripe work? Link to this post

    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.

Page: 1 2
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.