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, biapar, Willr, Ingo, swaiba, simon_w

Event Calendar, to extend or decorate?


Reply


3 Posts   736 Views

Avatar
cumquat

Community Member, 198 Posts

8 March 2011 at 12:00am

Hi guys,

I'm after some advice please as I keep confusing myself. I'm trying to set up a front end form that will allow a particular group of people to update our main calendar with some training dates. There is a requirement to have some more fields available for this particular form that are not part of the standard CalendarDateTime table, training organiser, location etc.

First question is really, do I extend the Event_calendar as in UC's Registration Tutorial, if so can these be made to show on the main calendar as I only want one calendar for the site or should I be decorating the CalendarDateTime table?

The concept of decorating a table has got me a bit turned around and I'm not sure what the best way is.

Cheers

Mick

Avatar
UncleCheese

Forum Moderator, 4094 Posts

9 March 2011 at 3:38am

That's a really good question, Mick.

When I built the EventCalendar module, it was my first attempt at a SilverStripe module, and for some reason I thought it was more user friendly to allow subclassing rather than force people to use decorators.

That ultimately resulted in an API that is far more complex than just decorating. In fact, the most recent version of EC did away with all that stuff. So just decorate. :-)

Avatar
cumquat

Community Member, 198 Posts

9 March 2011 at 4:36am

Cheers for that, i was leaning that way, thanks for the confirmation.

Mick