ExpressionEngine CMS
Open, Free, Amazing

Thread

This is an archived forum and the content is probably no longer relevant, but is provided here for posterity.

The active forums are here.

Calendar help

July 22, 2010 7:19am

Subscribe [3]
  • #1 / Jul 22, 2010 7:19am

    andrew_spl

    71 posts

    Hi,

    I’m sure this is a straight-forward problem to solve. I have a small calendar on a page with an entry listing alongside. The links on the calendar point to the same template, but the entry listing disappears on the page following. I wondered if I need to include ‘dynamic=“off”’ somewhere, but this seems to ruin the calendar.

    Thanks for your help.

    Andrew

  • #2 / Jul 22, 2010 12:55pm

    Sue Crocker

    26054 posts

    Hi, Andrew. What does the url look like? Can you show us an example?

  • #3 / Jul 22, 2010 1:01pm

    andrew_spl

    71 posts

    Hi Sue, the complete code looks like this:

    {exp:weblog:calendar switch="calendartoday|calendarcell" weblog="event_entry" show_future_entries="yes" sort="asc"} 
    
    <table id="event_calendar" summary="Event calendar" >
       <tr class="calendarheader">
          <th><div class="calendarmonthlinks"  id="back"><a href="http://{previous_path=events}"><<</a></div></th>
           <th colspan="5" id="calendardate">{date format="%F %Y"}</th>
           <th><div class="calendarmonthlinks" id="forward"><a href="http://{next_path=events}class=calendarmonthlinks">>></a></div></th>
        </tr>
        <tr>
        {calendar_heading}
            <td class="calendardayheading">{lang:weekday_short}</td>
               {/calendar_heading}
         </tr>
                {calendar_rows }
                {row_start}
         <tr>{/row_start}
              {if entries}
         <td class='{switch}' align='center'>
              {entries}
               <div class="event_link">
                  <a href="http://{title_permalink=%27events/details%27}" title="{title}">{day_number}</a>
                 </div>
    {/entries}
         </td>
              {/if}
              {if not_entries}
          <td class='{switch}' align='center'>{day_number}</td>
               {/if}
               {if blank}
          <td class='calendarblank'>{day_number}</td>
               {/if}
               {row_end}</tr>{/row_end}
            {/calendar_rows}
            </table>
    {/exp:weblog:calendar}
  • #4 / Jul 22, 2010 7:41pm

    Brandon Jones

    5500 posts

    Hi andrew, please give us an example of what the URL looks like when it works, and what it looks like when it doesn’t.

  • #5 / Jul 23, 2010 4:39am

    andrew_spl

    71 posts

    Sorry, misunderstood.

    The URL is:

    http://www.domain.org/events/

    Then after the calendar next month button is clicked:

    http://www.doamin.org/index.php/events/2010/08/

    (By the way I notice ‘index.php’ reappears in the URL.)

    Thanks

    Andrew

  • #6 / Jul 23, 2010 2:19pm

    Brandon Jones

    5500 posts

    I notice September seems to work properly: http://www.smithsrow.org/index.php/events/2010/09/

    Is it just a case of missing markup when there are no entries for the currently selected month?

  • #7 / Jul 26, 2010 5:19am

    andrew_spl

    71 posts

    I can see what is happening now. I might have been confused about how I was expecting the calendar to work.

    When the page loads first of all, all the future events are shown alongside the calendar as I wanted.

    But when I click through to the next month on the calendar the page only displays the events for that month in the list alongside it.

    Is there a way I can keep the events list as it appears when the page first loads?

  • #8 / Jul 26, 2010 8:18am

    andrew_spl

    71 posts

    OK, I see where I went wrong. The dynamic “off” needed to be added to the entry list, not the calendar. (Bangs head on desk). Thanks for your help.

  • #9 / Jul 26, 2010 10:03am

    Sue Crocker

    26054 posts

    Glad things are working again. Don’t hesitate to post again as needed.

.(JavaScript must be enabled to view this email address)

ExpressionEngine News!

#eecms, #events, #releases