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.

Help with Archive Page

February 03, 2011 4:08pm

Subscribe [3]
  • #1 / Feb 03, 2011 4:08pm

    Geoff Towle

    330 posts

    We have the below code in a template to display archives.  We have entries for January and February of this year.  When we click on January, this template displays “February” as the header (even though segment_5 is 01) and it includes entries from February and January.

    Everything in the code appears OK to me…

    {if segment_4}
                {exp:channel:entries channel="{segment_3}" year="{segment_4}" month="{segment_5}" disable="member_data|trackbacks" limit="50" paginate="both"}
                    {if no_results}
                        <h1>There were no results!</h1>
                    {/if}
                    
                {if count == 1}
                    <div class="header">
                        <h1><a href="http://{path=site/archive/{channel_short_name}}">{channel}</a>
    <span>Archive</span></h1>
                    </div>
                {/if}
                
                    {date_heading display="monthly"}
                    
                    <ul class="date_list">    
                        <li><h1>{entry_date format="%F %Y"}</h1></li>
                        
                    {/date_heading}
            
                    {if segment_3 == "iq_moments" OR segment_3 == "training_points"}
                        <li class="detail">
                            <h2><a href="http://{page_url}class=green">{title}</a> <span class="date">{entry_date format="%M %n"}</span></h2>
    <p>                        {cf_iq_body}<br />
                        </li>                <br />
                    {if:else}<br />
                        <li></p><h2><a href="http://{page_url}">{title}</a></h2><p></li><br />
                    {/if}</p>
    
    <p>                {date_footer display="monthly"}<br />
                        </ul><br />
                    {/date_footer}</p>
    
    <p>        {paginate}<br />
                <div class="pagination"><br />
                    Page {current_page} of {total_pages} pages {pagination_links}<br />
                </div><br />
            {/paginate}<br />
        <br />
            {/exp:channel:entries}<br />
        {/if}

  • #2 / Feb 03, 2011 4:11pm

    Geoff Towle

    330 posts

    Oh, also, the dates for all the January entries are appearing as Jan 1, but the actual entry dates vary.

  • #3 / Feb 04, 2011 9:36am

    Sue Crocker

    26054 posts

    Hi, Geoff.

    Can you tell us which version/build of EE2.x you’re using? See EEWiki:// HowTo Determine My EE Version

    When these entries were put in, what version of EE were you using?

  • #4 / Feb 04, 2011 3:03pm

    Geoff Towle

    330 posts

    Hi Sue,

    EE 2.1.1, build 20101020.  It’s been the same all along.

    Geoff

  • #5 / Feb 05, 2011 4:26pm

    Greg Salt

    3988 posts

    Hi Geoff,

    Firstly, can you please upgrade the latest version and build when possible. The latest is version 2.1.3 build 20101220 and we also have a beta version of 2.1.4 available. Do you have a link where we can see this template in action?

    Cheers

    Greg

  • #6 / Feb 10, 2011 1:09pm

    Geoff Towle

    330 posts

    Greg,

    We figured out that it was because the date/time was set to 02-01-2011 12:00 AM which, apparently, confused the app.  Changing the time to later in the morning fixed the problem.  Thank you.

    Geoff

  • #7 / Feb 10, 2011 2:07pm

    Ingmar

    29245 posts

    So, you’re good?

  • #8 / Feb 10, 2011 2:10pm

    Geoff Towle

    330 posts

    Yes, thanks.

  • #9 / Feb 10, 2011 2:18pm

    Ingmar

    29245 posts

    Cool. Please don’t hesitate to post again as needed.

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

ExpressionEngine News!

#eecms, #events, #releases