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.

2011 date issue, not displaying

January 07, 2011 11:06am

Subscribe [2]
  • #1 / Jan 07, 2011 11:06am

    cavrard

    16 posts

    We have a section of our site that displays upcoming events via the calendar weblog. It’s pulls based on the 5 next upcoming events. Since turning over to 2011 nothing in January is showing up in the listing for 2011. It’s still showing the 2010 upcoming events.

    Below is the code snippet that has worked up until ‘11.

    Running 1.7.0

    {exp:weblog:entries weblog="calendar" limit="5" show_future_entries="yes" orderby="date" sort="asc" dynamic="off" show_expired="no" category="not 57"}
    
    <ul>
    <li><a href="http://{url_title_path=events/calendar_detail}" title="Go to the event's website">{exp:char_limit total="20"}{title}{/exp:char_limit}</a> {if "{entry_date format='%m/%d/%y'}" == "{expiration_date format='%m/%d/%y'}"}
    {entry_date format="%m/%d/%y"}
    {if:else}
    {entry_date format="%m/%d/%y"} - {expiration_date format="%m/%d/%y"}
    {/if}</li>
    </ul>
    {/exp:weblog:entries}

    Is there something in the date formatting that I need to change?

    Thanks for the help,
    Carlos

  • #2 / Jan 07, 2011 4:53pm

    Sue Crocker

    26054 posts

    Hi, Carlos. If you take a look at your exp:weblog:entries loop, you’ll see that it’s sorting in asc or ascending mode, which is oldest first. So if you limit it to 5, it won’t be showing you those newer items.

    You’ll either need to sort in desc order, or increase the number of items you allow to be seen. You might also want to use the start_on parameter.

    http://expressionengine.com/legacy_docs/modules/weblog/parameters.html#par_start_on

    Does that help?

  • #3 / Jan 09, 2011 12:30pm

    cavrard

    16 posts

    Hi, Carlos. If you take a look at your exp:weblog:entries loop, you’ll see that it’s sorting in asc or ascending mode, which is oldest first. So if you limit it to 5, it won’t be showing you those newer items.

    You’ll either need to sort in desc order, or increase the number of items you allow to be seen. You might also want to use the start_on parameter.

    http://expressionengine.com/legacy_docs/modules/weblog/parameters.html#par_start_on

    Does that help?

    Thanks Sue,

    The start_on parameter did the trick. Although I still needed to sort by “asc” in order to get the 5 next events to show up rather than the 5 events that are the furthest in our calender.

    Thanks again,
    Carlos

  • #4 / Jan 10, 2011 8:50am

    Sue Crocker

    26054 posts

    Glad that worked for you.. Don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases