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 Error

October 18, 2011 12:08am

Subscribe [2]
  • #1 / Oct 18, 2011 12:08am

    aircan1

    5 posts

    I’m following the example code here for pagination:

    http://ellislab.com/expressionengine/user-guide/modules/channel/pagination_page.html

    However, I’m not able to display anything. My overall goal is to display one entry at a time, with pagination displayed like so:

    < Previous > 1 of 36 < Next >


    I tried some of the examples from the link above with no results and decided to try single variable to see if anything would display.


    Here is the code I’m using:

    {exp:channel:entries channel="session_1" limit="1" paginate="top"}
        {paginate}
            <strong>{total_pages}</strong>
        {/paginate}
    {/exp:channel:entries}

    I have two posts in the session1 channel.


    I’m on EE v2.2.2 - Build: date 20110801

  • #2 / Oct 18, 2011 11:24am

    Mark Bowen

    12637 posts

    Hi aircan1,

    The code shown in the documentation is now for the 2.3.0 version of ExpressionEngine. That said the code you have shown above should be showing something.

    Do you not see the number 2 displayed on your rendered template at all?

    If you try this code do you get what you are after here?

    {exp:channel:entries channel="session_1" limit="1" paginate="top"}
    
    {paginate}
     Page {current_page} of {total_pages} pages {pagination_links}
    {/paginate}
    
    {/exp:channel:entries}

    Thanks,

    Mark

     

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

ExpressionEngine News!

#eecms, #events, #releases