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 location

November 14, 2012 4:07pm

Subscribe [1]
  • #1 / Nov 14, 2012 4:07pm

    pmerritt

    24 posts

    I’m having trouble getting pagination to show up where I want it. I have a portfolio page with a table of entries. Right now the pagination is appearing in the top left corner, before the first table cell. I’d like to be able to show it in a different location, possibly in the lower right below the table. Any suggestions on how to go about it? It doesn’t matter what the pagination parameter is set to, it always shows up at the top of the table. Thanks.

    <table id="port_table">
    <body><tr>
    {exp:channel:entries channel="default_site" show category="6" limit="6" paginate="bottom"}
    
    <td id="port_cell"><a href="http://{url_title_path=blog/comments}">{portfolio_image}__<h3>{title}</h3><p></a><br />
     <br />
    {summary}</td><br />
    {if count == "3"}</tr><tr>{/if} <br />
    {if count == "6"}</tr><tr>{/if} <br />
    {if count == "9"}</tr>{/if} <br />
     {paginate}<br />
            {if previous_page}<br />
                <a href="http://{auto_path}">Previous Page</a><br />
            {/if}<br />
            {if next_page}<br />
                <a href="http://{auto_path}">Next Page</a><br />
            {/if}<br />
     {/paginate}<br />
    {/exp:channel:entries}<br />
    </body><br />
    </table><br />
    </div>

  • #2 / Nov 16, 2012 11:55am

    Dan Decker

    7338 posts

    Hi pmerritt,

    Give this a try:

    <table id="port_table">
    <tbody><tr>
    {exp:channel:entries channel="default_site" show category="6" limit="6" paginate="bottom"}
    
    <td id="port_cell"><a href="http://{url_title_path=blog/comments}">{portfolio_image}__<h3>{title}</h3><p></a><br />
     <br />
    {summary}</td><br />
    {if count == "3"}</tr><tr>{/if} <br />
    {if count == "6"}</tr><tr>{/if} <br />
    {if count == "9"}</tr>{/if}<br />
    <tr><td colspan="3"> <br />
     {paginate}<br />
            {if previous_page}<br />
                <a href="http://{auto_path}">Previous Page</a><br />
            {/if}<br />
            {if next_page}<br />
                <a href="http://{auto_path}">Next Page</a><br />
            {/if}<br />
     {/paginate}<br />
    </td></tr><br />
    {/exp:channel:entries}<br />
    </tbody><br />
    </table>

    I wrapped the paginate code into a table row and cell that will span the 3 columns. I also changed “body” to “tbody” since it was inside the table, I thought that would be your intent.

    Let me know if that checks out!

    Cheers,

  • #3 / Nov 16, 2012 4:03pm

    pmerritt

    24 posts

    Well, I gave it a try but it didn’t work for me. It seems to have changed the table rows somehow. Instead of having two rows of three images, it switched to 6 rows of individual images. And the pagination was still at the top. Any other suggestions?

    Thanks,
    Phillip

  • #4 / Nov 16, 2012 4:14pm

    glenndavisgroup

    436 posts

    Try this:

    <table id="port_table">
    <tbody><tr>
    {exp:channel:entries channel="default_site" show category="6" limit="6" paginate="bottom"}
    
    <td id="port_cell"><a href="http://{url_title_path=blog/comments}">{portfolio_image}__<h3>{title}</h3><p></a><br />
     <br />
    {summary}</td><br />
    {if count == "3"}</tr><tr>{/if} <br />
    {if count == "6"}</tr><tr>{/if} <br />
    {if count == "9"}</tr>{/if}<br />
     {paginate}<br />
    <tr><td colspan="3"> <br />
            {if previous_page}<br />
                <a href="http://{auto_path}">Previous Page</a><br />
            {/if}<br />
            {if next_page}<br />
                <a href="http://{auto_path}">Next Page</a><br />
            {/if}<br />
    </td></tr><br />
     {/paginate}<br />
    {/exp:channel:entries}<br />
    </tbody><br />
    </table>

    Just moved the opening and closing table row tags at the end inside the pagination tags so they only display when the pagination is displayed.

    Mike

  • #5 / Nov 20, 2012 5:12pm

    Dan Decker

    7338 posts

    Thanks Mike!

    pmerritt, does that work for you?

    Cheers,

  • #6 / Nov 20, 2012 8:42pm

    pmerritt

    24 posts

    It worked…thanks!

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

ExpressionEngine News!

#eecms, #events, #releases