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've moved the forum!

Please use forum.silverstripe.org for any new questions (announcement).
The forum archive will stick around, but will be read only.

You can also use our Slack channel or StackOverflow to ask for help.
Check out our community overview for more options to contribute.

All other Modules /

Discuss all other Modules here.

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

Preview: Event Calendar Module


Go to End


293 Posts   69208 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

17 April 2009 at 3:40am

Though I can't code it for you or promise you success, if it were my gig, here's how I'd do it.

Extend the Calendar class to AllWorkshopsHolder, and overload the getStandardEvents(), getRecurringEvents(), and getAnnouncements(), and possibly even the Events() method, as well, and have them include other WorkshopsHolders in your result set. This will grant you the liberty to simply hard code your class names, rather than relying on the Calendar "magic" to figure them out via your has_one and has_many arrays.

Like I said, it's too complex for me to give you example code, but if you build it out, post your work along with any problems you're having, I can do my best to figure it out. Good luck!

Avatar
Xeal

Community Member, 37 Posts

7 May 2009 at 4:27am

I thought I was just about done with questions when I realized something was missing. Well not really missing, but anyways. I've got a filter working on my calendar, however, if I click the month or a day for that matter, the filter remains there. I'm filtering by category and my category is let's say cheese, hehe... The filter remains cheese unless I click on the link again. Now personally, I don't really care, but the users that I'm making the site for would "prefer" it to be easier. I was trying to figure out how to do this, but I'm not even sure where to start. I'm hoping you can point me in the right direction.

Thanks :D!

Xeal

Avatar
UncleCheese

Forum Moderator, 4102 Posts

7 May 2009 at 4:37am

Really interesting you mention that. I just had a client that was really impressed with the widget retaining the filters and complimented my design. Hard to please everyone.

What would we envision for toggling this behavior? Maybe a checkbox below the calendar that says "preserve filters?"

Avatar
Xeal

Community Member, 37 Posts

7 May 2009 at 5:24am

Hehe yeah I know it's probably impossible to please everyone... I was thinking of something like that, maybe the filter itself could be saved in a session variable? and then if preserve filters is selected save it to the variable. When the user comes back to that page check if the variable is set?

Avatar
mobius

Community Member, 54 Posts

10 May 2009 at 3:04pm

Hey UncleCheese,

I've just tried to get the event calendar up and running, but my calendar page is giving a javascript error

jQuery("#calendar-widget").datePicker is not a function

any ideas as to what I've done wrong? Thanks

Avatar
UncleCheese

Forum Moderator, 4102 Posts

10 May 2009 at 7:51pm

What version of dataobject_manager are you on? Make sure you're up to date on the latest SVN.

Avatar
mobius

Community Member, 54 Posts

10 May 2009 at 8:47pm

Thats probably the problem - I didn't see that dataobject_manager was required anywhere?

Avatar
UncleCheese

Forum Moderator, 4102 Posts

12 May 2009 at 1:35am

That's weird. It shouldn't be required. Where are you getting the error exactly?

Go to Top