We use cookies to improve your experience. No personal information is gathered and we don't serve ads. Cookies Policy.

ExpressionEngine Logo ExpressionEngine
Features Pricing Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University
Log In or Sign Up
Log In Sign Up
ExpressionEngine Logo
Features Pro new Support Find A Developer
Partners Upgrades
Blog Add-Ons Learn
Docs Forums University Blog
  • Home
  • Forums

Repeet - Display events from current month

Development and Programming

megancoleman's avatar
megancoleman
14 posts
16 years ago
megancoleman's avatar megancoleman

I have a calendar page that displays a monthly calendar and a simple listing of events for that month. Both display properly when the URL references the month (i.e. /events/2009/02/) but on the main calendar page (/events/) the event list only displays events for the current day, which is the repeet default since the URL doesn’t include a date structure.

If I add Begin and End tags with specific dates to the exp:repeet:get_ids it works fine:

{exp:repeet:get_ids weblog="events" parse="inward" begin="2009-01-01" end="2009-01-31"}

My problem is that I want the main events page to display events for the current month, so I don’t want to have to hard code the begin and end days for a particular month.

Is there a way to format the begin/end dates relatively? I can seem to figure it out. Here’s the formatting you’re supposed to use: http://www.gnu.org/software/tar/manual/html_section/Date-input-formats.html

Here’s my code for the event list:

{exp:repeet:parse date_header_interval="month"}
{repeet:date_header}<h2>Event Details for %F:</h2>{/repeet:date_header}

{exp:repeet:get_ids weblog="events" parse="inward" begin="2009-01-01" end="2009-01-31"}        

{exp:weblog:entries weblog="events" display_by="month" entry_id="{repeet:entry_ids}" show_expired="yes" show_future_entries="yes" dynamic="off" }
{repeet:item}
{repeet:entry_id}{entry_id}{/repeet:entry_id}
{repeet:entry_date}{entry_date format="%Y-%m-%d %H:%i"}{/repeet:entry_date}
{repeet:expiration_date}{expiration_date format="%Y-%m-%d %H:%i"}{/repeet:expiration_date}
{repeet:interval}{event-repeat}{/repeet:interval}
{repeet:include_dates}{include-dates}{/repeet:include_dates}
{repeet:exclude_dates}{exclude-dates}{/repeet:exclude_dates}
{repeet:display}
<h3>{title}</h3>
{repeet:start_time format="%l, %M. %j%S"}{if expiration_date} to {expiration_date format="%l, %M. %j%S"}{/if}{if event-time}, {event-time}{/if}
{if event-description}{event-description}{/if}
{if event-forms}
<ul>
{event-forms}
<li><a href="http://{file_url}">{file_name}</a></li>
{/event-forms}
</ul>
{/if}
<hr >
{/repeet:display}
{/repeet:item}
{/exp:weblog:entries}
{/exp:repeet:get_ids}
{/exp:repeet:parse}
       
c@sey's avatar
c@sey
40 posts
16 years ago
c@sey's avatar c@sey

I’m having the same problem. According to the documentation you need to add dynamic=”off” to the repeet:get_ids tag. There was also a mention of a bug fix for dynamic=”off” in version 1.0.7 but I’m still experiencing the error.

       
megancoleman's avatar
megancoleman
14 posts
about 16 years ago
megancoleman's avatar megancoleman

I think I ended up leaving out the event list detail and just using the calendar view for my main calendar page.

       

Reply

Sign In To Reply

ExpressionEngine Home Features Pro Contact Version Support
Learn Docs University Forums
Resources Support Add-Ons Partners Blog
Privacy Terms Trademark Use License

Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.