I would like to color code the day cell according to the event category. I have 4 categories Islamic, TRA, Global and UAE.Following is a screenshot of the calendar I would like to have.
Can anyone help me with an example code that does this.
ExpressionEngine® Answers is a question and answer site for administrators, end users, developers and designers for ExpressionEngine® CMS. It only takes a minute to sign up.
Sign up to join this communityI would like to color code the day cell according to the event category. I have 4 categories Islamic, TRA, Global and UAE.Following is a screenshot of the calendar I would like to have.
Can anyone help me with an example code that does this.
On the {exp:calendar:cal} tag, I believe you could do enable="categories". You could then output the category for each event with class="category{categories}{category_id}{/categories}" and then just create some CSS to apply the colour for each class - such as category1, category2 etc.
Something like that might work.
I had to do something similar but categories were being used for something else, so in the calendar setup I split event categories into separate calendars and then used the events calendar ID to create class names as explained above. Same solution, different route.