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.

All other Modules /

Discuss all other Modules here.

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

Event Calendar Modul - Show Events of the whole year


Reply


7 Posts   1212 Views

Avatar
martin_w

Community Member, 28 Posts

25 January 2011 at 1:36am

Hi everybody,

I have installed the event calendar modul (http://silverstripe.org/event-calendar/)

I would like to show all events of the year on the main event page. (even if its march.. there still should be the january and february).

Can anybody help me to get that work?

thanks, martin.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

25 January 2011 at 3:30am

/your-calendar/view/2011

Avatar
martin_w

Community Member, 28 Posts

25 January 2011 at 10:06pm

hey hello,

thanks for the answer.
Of course that works.
But I want it to work when I am at "/your-calendar/"
so at the main page of the calendar.
is that possible too?

Avatar
lerni

Community Member, 80 Posts

25 January 2011 at 10:47pm

could it be this one? in code/Calendar.php

static $defaultFutureMonths = 1;

Avatar
martin_w

Community Member, 28 Posts

25 January 2011 at 11:14pm

well.. I cant get the whole year with changing the defaultFutureMonths.
it means just the future months.

Avatar
UncleCheese

Forum Moderator, 4094 Posts

26 January 2011 at 3:56am

You could just set up a redirect for /your-calendar/ to /your-calendar/view/2011. You just have to remember to change it ever year.

Another solution would be to decorate Calendar_Controller and add an index() action.

public function index() {
return Director::redirect(Controller::join_links($this->Link(),'view',date('Y'));
}

--------------------
SilverStripe tips, tutorials, screencasts and more: http://www.leftandmain.com

Avatar
martin_w

Community Member, 28 Posts

27 January 2011 at 4:14am

thats a quite good idea, thanks a lot :)