A dilly of a pickle.
I’ve got a calendar section on my still-in-development website. Yesterday I decided to implement RepEEt and it seems to not be cooperating.
Here’s the issue:
I’m using the “include dates” method, and have custom fields set up as follows:
When set up as directed in the documentation, the page does not render as expected: no events that should repeat, do.
All other events that do not repeat appear normally.
Obviously any help is appreciated…
Here’s the code I’m using in the template for the relevant section:
{exp:repeet:parse date_header_interval="day"}
{repeet:date_header}<h4 class="calendar-day">%F %j, %Y</h4>{/repeet:date_header}
{repeet:no_results}Oops, looks like there aren't any events in the time range you specified.{/repeet:no_results}
{exp:repeet:get_ids weblog="lmcc_calendar" status="Event|Deadline|Info Session" parse="inward"}
{exp:weblog:entries weblog="lmcc_calendar" status="Event|Deadline|Info Session" entry_id="{repeet:entry_ids}" dynamic="off" show_expired="yes" show_future_entries="yes"}
{repeet:item}
{repeet:entry_date}{calendar_date_start format="%Y-%m-%d %H:%i"}{/repeet:entry_date}
{repeet:expiration_date}{calendar_date_end format="%Y-%m-%d %H:%i"}{/repeet:expiration_date}
{repeet:include_dates}{calendar_include_dates}{/repeet:include_dates}
{repeet:exclude_dates}{exclude_dates}{/repeet:exclude_dates}
{repeet:display}
<div class="eventbox">
{if calendar_image}{calendar_image}{/if}
<h5>{status} | {categories}{if parent_id <= "16" && parent_id > "0"}<span class="program-name"> {/if}{category_name}{if parent_id <= "16" && parent_id > "0"}</span>{/if}{/categories} </h5>
<h4><a href="http://{title_permalink=">{title}</a></h4>
<h5>{calendar_date_start format="%M %j"}{if calendar_date_end && "{calendar_date_end format="%M %j"}" != "{calendar_date_start format="%M %j"}"}–{calendar_date_end format="%j"}{/if}</h5>
{calendar_excerpt}
{if calendar_rsvp}
<a href="http://{title_permalink=">Free reservation required.</a>
{/if}
</div> <!-- /event -->
{/repeet:display}
{/repeet:item}
{/exp:weblog:entries}
{/exp:repeet:get_ids}
{/exp:repeet:parse}The strangest thing happens, though, when I change this:
{repeet:expiration_date}{calendar_date_end format="%Y-%m-%d %H:%i"}{/repeet:expiration_date}To this:
{repeet:expiration_date}{calendar_date format="%Y-%m-%d %H:%i"}{/repeet:expiration_date}Things appear (almost) normally - events that should repeat are shown repeating, but past events are also listed.
Also worth noting, that the custom field in third code example (calendar_date) does not exist in my installation.
I believe I have solved this issue by adding this parameter to the “exp:repeet:get_ids” tag:
end="5 years"so that the final code looks like this
{exp:repeet:get_ids weblog="lmcc_calendar" status="Event|Deadline|Info Session" parse="inward" dynamic="off" begin="today" end="5 years"}The docs mention that if the “end” parameter is not specified, it will end with today’s date. Seems silly, but there we have it.
I’ll update this thread if I discover otherwise.
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.