While using Solspace Calendar I'm trying to limit recurrent events to only the next occurrence. I found a great tip on how to do it with PHP here: Solspace Calendar: Only show next occurrence of recurring event in list of recurring and non-recurring events
Here's a trimmed down version of what I'm currently trying:
{embed="_layouts/index"}
{exp:calendar:cal date_range_start="today" show_months="4" pad_short_weeks="n"}
{exp:stash:append_list name="events-list" parse_tags="yes"}
{stash:item_entry_id}{entry_id}{/stash:item_entry_id}
{/exp:stash:append_list}
{/exp:calendar:cal}
{exp:stash:get_list name="events-list"}
{exp:calendar:cal event_id="{item_entry_id}" event_limit="1"}
{exp:stash:set_list name="events-show"}
{stash:the_title}{title}{/stash:the_title}
{/exp:stash:set_list}
{/exp:calendar:cal}
{/exp:stash:get_list}
{exp:stash:set name="content"}
{exp:stash:get_list name="events-show"}
<h4>{the_title}</h4>
{/exp:stash:get_list}
{/exp:stash:set}
Content is then pulled into my template.
I'm given no output but even if it did my logic is clearly off. Hitting the database this much is really bad.
Any suggestions?