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

Event Calendar Adding Venue to Date & Time


Go to End


907 Views

Avatar
iancartwright

Community Member, 1 Post

20 June 2011 at 7:31pm

Hi
I have been following the tutorial on http://doc.silverstripe.org/old/recipes:extending_the_event_calendar and have been having problems trying to add the location when I am extending CalendarDateTime.
I have copied the code from the tutorial exactly and everything works fine up until I get to the following part of the tutorial and when i rebuild the database there is no location on the Date and Time tab.
<?php
class WorkshopDateTime extends CalendarDateTime
{
static $db = array (
'Location' => 'Varchar(50)'
);

static $has_one = array (
'Workshop' => 'Workshop'
);
}
static $has_many = array (
'Dates' => 'WorkshopDateTime'
);
?>

Any help would be much appreciated
Thanks