Forums / Setup & design / Make eZ Flow event calendar start week on Sunday
Mark Langkau
Monday 12 May 2008 7:59:44 pm
I'm using eZ Publish 4.0 and eZ Flow 1.3. How do I make the event calendar month view begin the week on Sunday rather than Monday?
Thanks,Mark
André R.
Tuesday 13 May 2008 1:15:34 am
You need to modify (override) the template in use. In 4.0 the template used is:extension/ez<flow|webin>/design/ez<flow|webin>/templates/full/event_view_calendar.tpl
In 3.9 / 3.10 it is in:extension/ez<flow|webin>/design/ez<flow|webin>/overrides/templates/full/event_view_calendar.tpl
eZ Online Editor 5: http://projects.ez.no/ezoe || eZJSCore (Ajax): http://projects.ez.no/ezjscore || eZ Publish EE http://ez.no/eZPublish/eZ-Publish-Enterprise-Subscription @: http://twitter.com/andrerom
Tuesday 13 May 2008 7:16:20 am
Thanks for your quick reply. I found the file in the ezwebin path. I have changed the "calendar_heading_days" from:
<tr class="calendar_heading_days"> <th class="first_col">{"Mon"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Tue"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Wed"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Thu"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Fri"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Sat"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th class="last_col">{"Sun"|i18n("design/ezwebin/full/event_view_calendar")}</th> </tr>
to:
<tr class="calendar_heading_days"> <th class="first_col">{"Sun"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Mon"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Tue"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Wed"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Thu"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th>{"Fri"|i18n("design/ezwebin/full/event_view_calendar")}</th> <th class="last_col">{"Sat"|i18n("design/ezwebin/full/event_view_calendar")}</th> </tr>
This obviously changes only the column heading. Now I'm not sure where to change the actual value of the first day of the week to be Sunday rather than Monday. Is that set in this same file?
Tuesday 13 May 2008 7:33:05 am
> Is that set in this same file?Yes, but it's pretty much coded into the template code there, so you have to just modify a lot of the code. I'ts a long time since I wrote it, but I think '$dayofweek' is quite important here, 0 is sunday and so on.
Tuesday 13 May 2008 12:05:26 pm
So there's no magic .ini file where I can tweak the setting, eh? hehe
It's a nice bit of code, and I thank you for it. My users here expect the week to start on Sunday, so I have some work to do. If I figure it out, I'll share it here.