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.

Exp:channel:entries - show past entries only

October 27, 2010 12:04pm

Subscribe [2]
  • #1 / Oct 27, 2010 12:04pm

    Maik Hoogkamer

    36 posts

    First post here 😊

    Is there any way to only show the past entries while using {exp:channel:entries}?
    I’ve tried to use stop_before={current_time format='%Y-%m-%d %H:%i'} as a parameter, but it still shows entries that have not expired yet.

    I want to make a page with archived events only. This is what I have:

    {exp:channel:entries 
                            channel="events" 
                            dynamic="no" 
                            show_expired="yes" 
                            show_future_entries="no" 
                            orderby="event_date" 
                            sort="asc" 
                            status="open" 
                            stop_before={current_time format='%Y-%m-%d %H:%i'}}
    
    [...]
                        {/exp:channel:entries}

    I also found this thread: http://ellislab.com/forums/viewthread/102726/ but no solution there as I want working pagination.

    Any suggestions?

  • #2 / Oct 28, 2010 4:36am

    Maik Hoogkamer

    36 posts

    Anyone?

  • #3 / Oct 28, 2010 6:19am

    Rob Allen

    3114 posts

    Welcome to the Forums!

    Entries have two keys dates, Entry date (ie publish date) and Expiration date (ie expires on). By default EE won’t display anything with an Entry date set in the future unless you specify that with the show_future_entries parameter.

    Are you using the Entry date for the date of your events, or are you using Expiration dates?

    Have you removed the stop_before parameter to see what happens?

  • #4 / Oct 28, 2010 8:34am

    Maik Hoogkamer

    36 posts

    Welcome to the Forums!

    Entries have two keys dates, Entry date (ie publish date) and Expiration date (ie expires on). By default EE won’t display anything with an Entry date set in the future unless you specify that with the show_future_entries parameter.

    Are you using the Entry date for the date of your events, or are you using Expiration dates?

    Have you removed the stop_before parameter to see what happens?

    I was using a custom field for the date of my events. I decided to use the entry date for that instead and now the tags do exactly what I want.

    Thanks 😊

  • #5 / Oct 28, 2010 11:15am

    Rob Allen

    3114 posts

    Cool - glad you got it sorted!

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

ExpressionEngine News!

#eecms, #events, #releases