4

I have a channel entries loop that I need to paginate but am having an issue with the location of the pagination code.

The channel entries loop surrounds a table structure but is inside the main table tags as to not repeat them.

The pagination code needs to be outside of the main table tags.

How can I achieve this?

1 Answer 1

9

Sure - something like this (simplified obviously):

{exp:channel:entries paginate="bottom"}
    {if count == "1"}<table>{/if}
        <tr>
            <td>{content}</td>
        </tr>
    {if count == total_results}</table>{/if}
    {paginate}
        <p>Page {current_page} of {total_pages} pages {pagination_links}</p>
    {/paginate}
{/exo:channel:entries}

In this case, your pagination links should appear after your table closes.

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.