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.

Problems with pagination

December 21, 2011 5:16pm

Subscribe [1]
  • #1 / Dec 21, 2011 5:16pm

    darrenlc

    11 posts

    I have pagination working properly on a news archive page using the following code:

    {exp:channel:entries
         channel="news-items"
         year="{segment_3}"
         disable="categories|category_fields|trackbacks"
         dynamic="off"
         require_entry="yes"
         limit="15"
         paginate="bottom"
         paginate_base="/site/news-archives/{segment_3}/{segment_4}"
         }
                 
          <li><h3><a href="http://{title_permalink=news-item}">{title}</a></h3>
    <p>      <input type="hidden" value="" name="news_id">{entry_date format="%n/%j/%Y"}  </li><br />
        <br />
         <br />
         {paginate}<br />
    </ul><br />
          </p>
    
    <p>       <div id="news_pagination"><br />
           {pagination_links}<br />
            {current_page} of {total_pages}<br />
           </div><br />
           <br />
         <br />
         {/paginate}


    However, this very similar code is not working correctly on a different page:

    {exp:channel:entries
         channel="news-items"
         disable="categories|category_fields|trackbacks"
         dynamic="off"
         require_entry="yes"
         limit="15"
         paginate="bottom"
         paginate_base="/whats-new"
    
         }
                 
          <li><h3><a href="http://{title_permalink=news-item}">{title}</a></h3>
    <p>      <input type="hidden" value="" name="news_id">{entry_date format="%n/%j/%Y"} - </li><br />
        <br />
         {paginate}<br />
    </ul><br />
          </p>
    
    <p>       <div id="news_pagination"><br />
           {pagination_links}<br />
            {current_page} of {total_pages}<br />
           </div><br />
           <br />
         {/paginate}

    When I click on one of the pagination links from this second example, I receive a 404 page not found error.

     


    UPDATE—————————————————————————————————————————

    I checked the way the page was set up previously and the previous designer had set the paginate_base value to “/news”. I tried setting paginate_base to the same value and the pagination links worked correctly with no more 404 errors. However, I don’t understand where this is coming from. There are no pages that have this url and there are no links within NAVEE that go here. So how is this defined and how can I change it?

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

ExpressionEngine News!

#eecms, #events, #releases