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

Go to End

15 Posts   2449 Views


12 July 2011 at 1:42am (Last edited: 12 July 2011 1:49am), Community Member, 95 Posts

Hello, I have installed event calendar, and for now it seems it is working.
I would, however, like to make a few adjustments:

first of I don't want it to be shown only as a page, but only the actual calendar in a sidebar on every page
second I would like events in calendar to be shown in different color then the days with no events

i think it is doable, any ideas?

mby som1 alrdy done it?

EDIT: as far as i can understand the actual calendar is described in template by $calendarwidget inside 2 div <div id="calendar-sidebar"> <div id="monthNav">
Now I need that to put it in a general sidebar that is shown on every page with $calendarwidget, then since it would be only calendar to have events colored diferently than the other days, that every days in calendar still works as a link to calendar event holder page, and also 3 events that would be first to be shown ad links beneath the calendar...
It shouldn't be impossible, or even 2 hard to make, but since i'm close to my deadline and still have other things to finish, I am asking for help.

ty all!


12 July 2011 at 8:20pm (Last edited: 12 July 2011 9:43pm), Community Member, 95 Posts

OK, so I have played a bit with it myself, and have made my own calendar-widget.css
This is (almost) the look I need.
Now, does som1 have any idea how to remake calendar so it doesn't show differently selected dates, but the ones having an event in them?
This is kinda interesting since calendar will be in sidebar (also need help how to place it there and still have all the links intact) and it should show interesting dates by different colors (sth like selected) so people know when there are some vents, and not by randomly clicking month/week/day until they select enough so the do find something.

Well also been playing with $Calendar_Widget , I can't seem to find a way to place it in sidebar on other pages...
Is it made so that it can only bee used within the calendar (holder) page?

even tried following this post,

with it i have managed to place calendar in sidebar as a widget, but only on one page...
that would mean I would have to place it on each and every page manually?!
is there a way to include same widget on EVERY page? I know I am only including widget area, but is there a way to make it so there is a certain widget on that particular widget area on EVERY page? i placet it in a sidebar on page.php ( that every other page extends (via $Layout like in tutorial)
also I have absolutely no idea how to chage the looks of that calendar now :(

Attached Files

13 July 2011 at 12:12am Community Member, 95 Posts

Well I have again kinda found a way to show only 1 widget w/o widget area, but sth in the function is wrong:

function Kalendar() {
$widget = new EventCalendarWidget();
$widget->Calendar = "Event kalendar";
return $widget->renderWith("WidgetHolder");

i know that widget is created normaly and is renderd normaly cause i can see part of it, but i think $widget->Calendar = "Event kalendar"; doesn't work ("Event kalendar" is the name of calendar (holder) page)

prolly sth wrong there, ideas?


13 July 2011 at 1:42am 4085 Posts

LiveCalendarWidget is decorated into the SiteTree class, so all you need to do is $LiveCalendarWidget on any template. If you have multiple calendars, you can specify the URLSegment of the calendar you want as the first argument. $LiveCalendarWidget(my-calendar)

SilverStripe tips, tutorials, screencasts and more:


14 July 2011 at 12:07am Community Member, 95 Posts

Hey UncleCheese, thank you, didn't see that before.
In any case I am using the live widget now and am currently working on template for it.
The thing is I am from Croatia and we have a custom that a week in calendar starts with monday and ends with sunday, and not like it is now that it starts with sunday and ends with saturday.
In any case I've been looking into how to change that, but can't figure it out how to do it, can you help plz?


15 July 2011 at 8:19pm Community Member, 95 Posts

also would have to get 1 or 2 most recent events in textual form - title and date - as a link to calendar holder page holding those events, is it doable?


19 July 2011 at 7:34pm Community Member, 95 Posts

Could rly use some more help with this, thank you.


20 July 2011 at 9:20am 4085 Posts

RecentEvents() is also decorated into the SiteTree object.

<% control RecentEvents(2) %>
$EventTitle $Link $_Dates
<% end_control %>

SilverStripe tips, tutorials, screencasts and more:

Go to Top