0

Is there an easy way to display a list of 12 months, with the events displayed for each month. Therefore, not dividing each month into days?

A parent summary view to the calendar month page, if you will?

Thanks, Ian

0

This can be done with the Calendar:Cal tag, using the {display_each_month} variable pair. Your code would look something like this:

<ul>
{exp:calendar:cal
    channel="calendar_events"
    date_range_start="today"
    show_months="12"
    pad_short_weeks="n"
}

    {display_each_month}
        <li>
            <h3>Month: {date format="%F"} ({month_event_total} events_</h3>
            <ul>
                {events}
                <li><a href="{path="calendar/events"}/{event_id}/">{event_title}</a> &nbsp; {event_start_date format="%F %j, %Y at %g:%i%a"} - {event_end_date format="%F %j, %Y at %g:%i%a"}</li>
                {/events}
            </ul>
        </li>
    {/display_each_month}

    {if no_results}
        <li>No results</li>
    {/if}

{/exp:calendar:cal}
</ul>

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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