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:

All other Modules /

Discuss all other Modules here.

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

Event Calendar - Added field not showing up?

Go to End

3 Posts   1121 Views


Community Member, 125 Posts

18 June 2010 at 2:53am

Hi, I added one field to the CalendarEvents.php which is "Summary".
ind the DB array I put 'Summary' => 'Varchar(255)',
and in the getCMSFields I put $f->addFieldToTab("Root.Content.Main", new TextField("Summary","One Line Summary"), "Content");

But in my file I have $Summary and nothing is showing up.
I entered text in the admin for it.

Any idea?


Forum Moderator, 4102 Posts

18 June 2010 at 3:34am

The Events() control, despite the misleading name, actually returns CalendarDateTime objects, because Events can have many dates. You need to use the $Event accessor.. $Event.Summary

This is all in the docs under "extending event calendar"..


Community Member, 125 Posts

18 June 2010 at 3:50am

Ahh, thanks
working now. I had tride $Events.Summary and $Summary but not $Event.Summary