We have a day view (schedule) and wanted to tint the background of every-other event in the schedule. The switch variable doesn't seem to work, and there's no count variable we could discover... how would you go about this?

We're inside of the {calendar:events} loop at this point. Are we missing something?


1 Answer 1


I suppose you could just do this with CSS:

tr.yourclassname:nth-child(even) { background: #CCC }
  • Well duh! ... as folks use to say. I was thinking programmatically. This should work though. Thanks for shaking my brain loose. Commented Oct 17, 2017 at 19:46
  • Happy to help :)
    – Solspace
    Commented Oct 18, 2017 at 20:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.