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.

Blog Module /

Discuss the Blog Module.

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

Compatibility between Blog module and Event Calendar


Go to End


1560 Views

Avatar
sekjal

Community Member, 7 Posts

3 March 2016 at 5:32am

I'm attempting to use both the Blog module (latest stable version) and Unclecheese's Event Calendar module (also latest) together on the same site. They seem like they would be very complimentary; I'd like to be able to include Event Pages in my Blog feed, for example, so our Development office doesn't have to maintain the same text in two places.

Problem is, both modules implement index() in their controller classes; the blog module does this without parameters, while Event Calendar defines it as index(SS_HTTPRequest $r). Either way I define my Page_Controller::index(), one of the modules is going to bark about incompatible declarations. I can't use both modules without modifying them locally (which I don't want to do in the long term).

What's the best way to declare Page_Controller::index()? Should it include the SS_HTTPRequest or not? The documentation seems to go one way, while much of the example code available for starting 'mysite' goes the other.

If there is a best practice, what does that mean for modules that don't currently conform to it?