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.

Showing Expired and Future Events

April 06, 2011 3:35pm

Subscribe [3]
  • #1 / Apr 06, 2011 3:35pm

    KAAB

    9 posts

    I am trying to display both expired and future entries on a sports team page so that users can see scores of past contests in addition to upcoming contests. Right now, the current setup is only showing expired contests. Changing to dynamic=“off” has had no effect.

    {exp:weblog:entries weblog="upcoming" dynamic="off" related_categories_mode="on" show_future_entries="yes" show_expired="yes" sort="asc"}
    
    {if upcoming-event}
         {upcoming-event}
          <tr>
             <td>{entry_date format='%D'}</td>
             <td>{entry_date format='%m/%j'}</td>
             <td>{event-opponent}</td>
             <td>{event-location}</td>
             <td>{event-time}</td>
             <td>{event-results}</td>
          </tr>
         {/upcoming-event}
         {if no_results}
         <tr class="no-sched">
            <td class="empty" rowspan="3" colspan="5">There are no scheduled events.</td>
         </tr>
    {/if}
    {/exp:weblog:entries}

    Thanks in advance for the help.

  • #2 / Apr 07, 2011 1:51pm

    Lisa Wess

    20502 posts

    Hi, KAAB -

    First, let’s start by simplifying the tag.  You may be hiding things unintentionally using that conditional

    Can you try this:

    {exp:weblog:entries weblog="upcoming" dynamic="off" related_categories_mode="on" show_future_entries="yes" show_expired="yes" sort="asc"}
    
         {upcoming-event}
          <tr>
             <td>{entry_date format='%D'}</td>
             <td>{entry_date format='%m/%j'}</td>
             <td>{event-opponent}</td>
             <td>{event-location}</td>
             <td>{event-time}</td>
             <td>{event-results}</td>
          </tr>
         {/upcoming-event}
         {if no_results}
         <tr class="no-sched">
            <td class="empty" rowspan="3" colspan="5">There are no scheduled events.</td>
         </tr>
    {/exp:weblog:entries}

    Also, is upcoming_event a Matrix field or something else?

    and lastly, are these all Open status?

    Thank you!

  • #3 / Apr 11, 2011 1:31pm

    KAAB

    9 posts

    Hi Lisa,

    Yes, upcoming-event is a Matrix field and all entries are defaulted to the “open” status.

    I have updated to the code snippet to what you provided, but am still seeing the same results:

    {exp:weblog:entries weblog="upcoming" dynamic="off" related_categories_mode="on" show_future_entries="yes" show_expired="yes" sort="asc"}
    
         {upcoming-event}
          <tr>
             <td>{entry_date format='%D'}</td>
             <td>{entry_date format='%m/%j'}</td>
             <td>{event-opponent}</td>
             <td>{event-location}</td>
             <td>{event-time}</td>
             <td>{event-results}</td>
          </tr>
         {/upcoming-event}
         {if no_results}
         <tr class="no-sched">
            <td class="empty" rowspan="3" colspan="5">There are no scheduled events.</td>
         </tr>
    {/exp:weblog:entries}

    Any additional insight would be very helpful. This seems like it should be an easy fix, but I haven’t been able to find any resources regarding this specific issue. You can see the issue on the live site by clicking on the schedule tab here: http://sheldonathletics.com/teams/spring-sports/baseball/ There are currently games scheduled out through April 16 and none of them are showing up past the last expired event.

    Thanks again in advance

  • #4 / Apr 11, 2011 8:50pm

    KAAB

    9 posts

    When I set the limit to 250, I was able to see everything. This will work for now, though it is less than ideal

  • #5 / Apr 12, 2011 7:41am

    John Henry Donovan

    12339 posts

    KAAB,

    When I set the limit to 250, I was able to see everything. This will work for now, though it is less than ideal

    EE has a default limit of 100 so anything over that then you will have to manually set.

  • #6 / Apr 12, 2011 12:48pm

    KAAB

    9 posts

    That shouldn’t be a problem as most of these lists only contain 20-40 items at most.

  • #7 / Apr 12, 2011 8:39pm

    Brandon Jones

    5500 posts

    Sounds good, KAAB. Glad that works!

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

ExpressionEngine News!

#eecms, #events, #releases