Ad Space
Ad Space

Hosting Geared For
your CMSMS needs

CMSMS ready Hosting

Hosting Starting at $15

  • • Hosted Mail
  • • Personal Control Panel
  • • CMSMS 1.8.1 tested
  • • Lightly packed servers
  • • Intrusion Detection
  • • URL monitored
  • • Custom solutions available

Order your hosting Now

CP Blogs

color coding you calendar events... (CGCalendar/Calendar1.0)

Posted by: Jeremy Bass
on May 24, 2009

Category:

CMS Made Simple, My Top CMSMS tricks, Basics, Coding

Summary:

Color code your calendars


Ad Space

Ok.. for the calendars it's

 {foreach from=$event.categories key=category item=item}{$item.category_name}{/foreach} 

for the lists it's

 {foreach from=$event.categories key=key item=item}{$key}{/foreach} 

so a list sample would be:

 {foreach from=$events key=key item=event}
<div class="calendar-event {foreach from=$event.categories key=key item=item}{$key}{/foreach}">
<h2>{$event.event_title}</h2>
...etc to close {/foreach}

then you just CSS it up and off you go...

cheers
jeremyBass

Ad Space

Get Social With It

[+]

Add A Comment

[+]

Code in the picture:
Title:
Your Name(*):
Email:
Notify me of any further comments to this thread:
Website:
Comment(*):
 
Previous page: Hosting FAQ Next page: Experimental