I was just wondering if anyone knew how to change the background colour of an event day in calendar. At the moment the number only has a colour of a hyperlink and is very hard to distinguish from the others. If all the event day had a different colour then it would be easier to that it was an event.
If it is not in this version on calendar i think it would be cool to have it in the next version.Just easier to notice that there is an event on the calendar.
here is my site if anyone wants to see the calendar.
thanks
evoke
[solved] Changin colour of event day in Calendar
[solved] Changin colour of event day in Calendar
Last edited by evoke28 on Fri Feb 08, 2008 8:23 pm, edited 1 time in total.
Re: Changin colour of event day in Calendar
If you're using the calendar stylesheet:
#big .event { background-color: #FFB6C1;}
and the template:
Nullig
#big .event { background-color: #FFB6C1;}
and the template:
Code: Select all
<td {if isset($day.class)}class="{$day.class}"{/if}
{if isset($day.events.0)}
{foreach from=$day.events item=event}
class="event"
{/foreach}
{/if}>
Last edited by Nullig on Thu Feb 07, 2008 12:53 am, edited 1 time in total.
Re: Changin colour of event day in Calendar
Thanks for the reply.Tried what you said but after that only half the site came up. not sure why. Here is my original calendar template code.
Can you see a problem of why it would not work. I am running cms 1.1.4 taga.
Not sure what other information to tell you.
thanks
evoke
Code: Select all
{strip}
<table class="calendar" id="{$table_id}">
{if $compact_view neq 1}
<caption class="calendar-month"><span class="calendar-prev"><a href="{$navigation.prev}">«</a></span> {$month_names[$month]} {$year} <span class="calendar-next"><a href="{$navigation.next}">»</a></span></caption>
{/if}
<tbody><tr>
{foreach from=$day_names item=day key=key}
<th abbr="{$day}">{$day_short_names[$key]}</th>
{/foreach}</tr>
<tr>
{* initial empty days *}
{if $first_of_month_weekday_number > 0}
<td colspan="{$first_of_month_weekday_number}"> </td>
{/if}
{* iterate over the days of this month *}
{assign var=weekday value=$first_of_month_weekday_number}
{foreach from=$days item=day key=key}
{if $weekday == 7}
{assign var=weekday value=0}
</tr>
<tr>
{/if}
//Below is what you want to change completely[/size]
<td {if isset($day.class)}class="{$day.class}"{/if}>
{if isset($day.events.0)}<a href="{$day.url}">{$key}</a>
{if $summaries == true}
<ul>
{foreach from=$day.events item=event}
<li><a href="{$event.url}">{$event.event_title}</a></li>
{/foreach}
</ul>
{/if}
//to as far as here
{else}{$key}{/if}
</td>
{math assign=weekday equation="x + 1" x=$weekday}
{/foreach}
{* remaining empty days *}
{if $weekday != 7}
<td colspan="{math equation="7-x" x=$weekday}"> </td>
{/if}
</tr>
</tbody></table>
{/strip}
Can you see a problem of why it would not work. I am running cms 1.1.4 taga.
Not sure what other information to tell you.
thanks
evoke
Last edited by evoke28 on Thu Feb 07, 2008 8:41 pm, edited 1 time in total.
Re: Changin colour of event day in Calendar
Change:
to:
Nullig
Code: Select all
<td {if isset($day.class)}class="{$day.class}"{/if}>
Code: Select all
<td {if isset($day.class)}class="{$day.class}"{/if}
{if isset($day.events.0)}
{foreach from=$day.events item=event}
class="event"
{/foreach}
{/if}>
Re: Changin colour of event day in Calendar
That did the trick thans a million