0

I have a monthly calendar, and I just want to change the color of a day if it has an event on that day. It works great with single day events, but for days that span multiple days, day_event_total only counts the first day. Code looks like this:

<td class="day_cell {if day_event_total > 0}has_events{/if}">
    {if day_event_total > 0}
    <a class="num"
        href="{path='/envelopers/community/calendar'}/{date format="%Y/%m/%d"}/">
    {/if}
    <div class="date">
        {date format="%j"}
    </div>
    {if day_event_total > 0}
        </a>
    {/if}
{if:else}
    <td class="day_cell out_of_range">
    <div class="date">
    <span class="num">
        {date format="%j"}
    </span>
    </div>
{/if}
</td>

1 Answer 1

0

The issue here is that the {if event_multi_day}{/if} conditional is only available within the {events}{/events} variable pair. Color-coding events is easy this way, but color-coding days based on event data is not really possible.

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.