0

I have just upgrade to Calendar 2.0.5 and I used to have a template that generated a list of events sorted by month using the {display_each_month} loop within {exp:calendar:cal} tag. Now that the cal tag no longer exists I can't figure out how to do this...

<ul>
{exp:calendar:cal sort="asc" dynamic="no" calendar_name="events" date_range_start="today" show_months="3" pad_short_weeks="n"}
{display_each_month}  <br/>              
<p><strong>{date format="%F"}</strong></p>
{if month_event_total == "0"}<li>There are no events scheduled for {date format="%F"}.</li>{/if} 
{events}
<li><strong>{event_start_date format="%d"}</strong> - {event_title}</li> 
{/events}                        
{/display_each_month} 

{/exp:calendar:cal} 
0

I'm assuming it's the Month headings you want included in the list? Unfortunately this is currently not possible with Calendar 2. The closest you could get would be this code, but it would not give you any month headings:

<ul>
{exp:calendar:events
    channel="events"
    date_range_start="today"
    date_range_end="3 months"
    limit="50"
}
    <li>
        <a href="{path='calendar/events'}/{calendar:url_title}/">{calendar:title}</a>
        ({calendar:event_start_date format="%F %j, %Y"})
    </li>
    {if calendar:no_results}
        <li>No results found.</li>
    {/if}
{/exp:calendar:events}
</ul>
2

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.