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

Calendar with Repeet - 2 requests

Development and Programming

Arnaud M.'s avatar
Arnaud M.
12 posts
16 years ago
Arnaud M.'s avatar Arnaud M.

Hi,

I work on a calendar with the Repeet plugin.

I have the 2 following requests (that I try to fix): - I want to display repeating entries as well as non-repeating (normal) entries. (now, for example, I have 7 displaying events for 1 events during 7 days. - If I have an events between the first of the month and the 15th, when I click on the cell of 8th in the calendar, I want to display the event(s).

Thank you for your precious help and for sharing it.

With regards.

Arnaud

       
Arnaud M.'s avatar
Arnaud M.
12 posts
16 years ago
Arnaud M.'s avatar Arnaud M.

the index page code:

<body>
<div>
{exp:repeet:parse date_header_interval="day"}
      {repeet:date_header}%M %d, %Y{/repeet:date_header}
      {repeet:no_results}Oops, looks like there aren't any events in the time range you specified.{/repeet:date_header}
      
      {exp:repeet:get_ids weblog="calendrier" parse="inward"}

        {exp:weblog:entries weblog="calendrier" entry_id="{repeet:entry_ids}" dynamic="off" show_expired="yes" show_future_entries="yes"}
        {repeet:item}
          {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}{repeat_interval}{/repeet:interval}
          {repeet:include_dates}{include_dates}{/repeet:include_dates}
          {repeet:exclude_dates}{exclude_dates}{/repeet:exclude_dates}
          {repeet:display}
           <div class="eventToday {if entry_date <= current_time}eventPast{/if}">
                                    <span class="hour">{repeet:start_time format="%g:%i"}</span><span class="ampm">{repeet:start_time format="%a"}</span>
                                    <h4>{title}</h4>{event_description}
                                </div>
            <h2><a href="http://{url_title_path=" title="{title}">{title}</a></h2>
            {summary}
            <a href="http://{url_title_path=" title="Get more information about {title}">Details</a>...
          {/repeet:display}
        {/repeet:item}
        {/exp:weblog:entries}

      {/exp:repeet:get_ids}

    {/exp:repeet:parse}
</div>
<div>{embed="outils/calendrier2"}</div>
</body>

the calendar code:

{assign_variable:my_weblog="outils"}
{exp:repeet:get_ids weblog="calendrier" parse="inward" calendar="yes"}
  {exp:repeet:calendar weblog="calendrier" interval_field="repeat_interval" include_field="include_dates" exclude_field="exclude_dates"  switch="calendarToday|calendarCell" entry_id="{repeet:entry_ids}" show_future_entries="yes" show_expired="yes"}
    <table class="calendarBG" summary="Mini Events Calendar">
      <tr class="calendarHeader">
        <th colspan="7"><a href="http://{events_directory}{date" title="View all events in {date format=">{date format="%F %Y"}</a></th>
      </tr>
      <tr>
        {calendar_heading}
        <td class="calendarDayHeading">{lang:weekday_abrev}</td>
        {/calendar_heading}
      </tr>
      {calendar_rows }
      {row_start}<tr class="calendarRow">{/row_start}
        {if entries}
        <td class='{switch}' align='center'><a href="http://{day_path={my_weblog}/index}">{day_number}</a></td>
        {/if}
        {if not_entries}
        <td class='{switch}' align='center'>{day_number}</td>
        {/if}
        {if blank}
        <td class='calendarBlank'> </td>
        {/if}
      {row_end}</tr>{/row_end}
    {/calendar_rows}
    <tr class="calendarMonthLinks">
       <td colspan="3">
         <div class="calendarPrevMonth"><a href="http://{previous_path={my_weblog}/index}"><<</a></div>
       </td>
       <td></td>
       <td colspan="3">
         <div class="calendarNextMonth"><a href="http://{next_path={my_weblog}/index}">>></a></div>
       </td>
     </tr>
   </table>
  {/exp:repeet:calendar}
{/exp:repeet:get_ids}
       
Ingmar Greil's avatar
Ingmar Greil
29,243 posts
16 years ago
Ingmar Greil's avatar Ingmar Greil

Let me move this to the appropriate forum, as it’s not a first party plugin.

       

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.