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


Sure - something like this (simplified obviously):

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

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


Your Answer

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

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