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

Calendar event module - upcoming events on homepage?


Go to End


36 Posts   9007 Views

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 March 2009 at 6:39am

So sorry about this, guys. I don't know what's wrong with that SVN. I've set anonymous checkouts, but it's just not working, so I've migrated to a better SVN host. Please delete your working copies and do a fresh checkout from

http://bluehousegroup.svn.beanstalkapp.com/modules/trunk/event_calendar

@dreamstudio -- To put a calendar widget anywhere on the site... It looks like this will be a little clunky, but I could use the testing.

PageController.php

function CalendarWidget()
{
return new CalendarWidget(
DataObject::get_one("Calendar"), // controller
null, // start date
null, // end date
true // default view
);
}

Try that and let me know how it goes.

Avatar
dreamstudio

Community Member, 48 Posts

20 March 2009 at 7:01am

That download worked a treat.

I tried finding the pagecontroller.php file and I cant see it anywhere in the site directory

Also the install still doesnt show the bind down option... is that an old feature thats been removed

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 March 2009 at 7:35am

Edited: 20/03/2009 7:35am

It's an old feature that's been removed. That level of presentation should not be controlled in the CMS.

PageController will be in Page.php, which is in mysite/code/

Or if you're using a theme it might be themes/mytheme/code/.. not sure, though.. one of those two.

Avatar
dreamstudio

Community Member, 48 Posts

20 March 2009 at 10:09am

I added the function code you listed for the calendar widget to the mysite/code/page.php file and added in $CalendarWidget to my page.ss under themes.... nothing appeared though....

Im running the latest version of SS so not sure if that could affect it

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 March 2009 at 10:17am

Please post your Page.php code and the template you're using.

Avatar
dreamstudio

Community Member, 48 Posts

20 March 2009 at 10:44am

page.php attached... I made my own theme but i also tried it on blackcandy and added $CalendarWidget to page.ss under templates/layout

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 March 2009 at 10:47am

I'm debugging this right now. Looks like it wasn't quite built to do this. I'll have something in a sec for you.

Avatar
UncleCheese

Forum Moderator, 4102 Posts

20 March 2009 at 10:49am

Okay, try an SVN update and do it again. Haven't tested it yet, but I think it will work.