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

Adding an Image to the Event Calendar


Go to End


26 Posts   8791 Views

Avatar
thomas.paulson

Community Member, 107 Posts

2 February 2015 at 6:56pm

Yes, this wont work with SS3.
Please check the below link 'DataObjectDecorator' are replaced with DataExtension
http://doc.silverstripe.org/en/developer_guides/extending/extensions

Avatar
bones

Community Member, 110 Posts

3 February 2015 at 9:43am

Got it, thanks.

I've also got the first 5 items displaying on the homepage (with some help from this thread: http://www.silverstripe.org/community/forums/all-other-modules/show/21366 ). The fields from the module show on the homepage OK, but the fields from the decorator aren't being pulled across.

Here's my code in Page.php:

public function MyUpcomingEvents($numEvents=5) { 
	return DataObject::get_one("Calendar")->UpcomingEvents($numEvents); 
}

How would I modify this to also pull in the fields from my CalendarEventDecorator, please?

Many thanks again :)

Go to Top