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.

Pagination

July 11, 2008 8:24pm

Subscribe [2]
  • #1 / Jul 11, 2008 8:24pm

    mencargo

    16 posts

    Hi there, I don’t really know how pagination and offset works, and I can’t figure it out.
    I want 2 types of Next/Previous links:

    Single entry page -> Next and Previous entry.

    I use this code:

    {exp:weblog:entries weblog="news" limit="1" disable="member_data|trackbacks"}
    ...
    
    {paginate} 
    {if {current_page} == 1} 
    Previous 
    {/if} 
    {if previous_page} 
    <a href="http://{auto_path}">Previous</a> 
    {/if} 
    {if {current_page} == {total_pages}} 
    Next 
    {/if} 
    {if next_page} 
    <a href="http://{auto_path}">Next</a> 
    {/if} 
    {/paginate}
    
    {/exp:weblog:entries}

    Seems to do it’s thing ok, but I algo want:

    Multiple entrie page -> Next and Previous bunch of entries.

    I’m thinking something like:

    {exp:weblog:entries weblog="news" limit="7" disable="member_data|trackbacks"}
    ...
    {/exp:weblog:entries}
    {exp:weblog:entries weblog="news" offset="7" disable="member_data|trackbacks"}
    {paginate} 
    {if total_pages>1}
      <div class="pagination"> 
      Page {current_page} of {total_pages} pages : {pagination_links} 
      </div> 
    {/if}
    {/paginate}
    {/exp:weblog:entries}

    I have tried several codes and still don’t see anything…

  • #2 / Jul 22, 2008 3:06am

    mencargo

    16 posts

    bump, any thoughts?

  • #3 / Jul 22, 2008 5:44am

    Ingmar

    29245 posts

    Next / Previous are only meant for single entry pages, I am afraid.

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

ExpressionEngine News!

#eecms, #events, #releases