Jump to content

Color Calendar Widget based on Calender


Music Case

Recommended Posts

Hello,

So i'm currently messing around with the calendar to try and get the UpcomingEvents widget to correspond with the different calendar colors. My original idea was something like this:

{{if \IPS\calendar\event::container()->calendar_id === 1}}
<style>
#ipsCalendar {
  background-color: [color];
}
</style>
{{elseif \IPS\calendar\event::container()->calendar_id === 4}}
<style>
#ipsCalendar {
  background-color: [different_color];
}
</style>
{{endif}}

but this returns a PHP error i presume it's because i got the string wrong for the calendar ID's but i can't find anything in the code of my site or on the internet which would indicate anything else.

Any help would be greatly appreciated!

 

Thanks.

Link to comment
Share on other sites

Guest
This topic is now closed to further replies.
×
×
  • Create New...