0

I'm using the native EE pagination and it's only showing the next two pages (i.e. 1, 2 & 3) when there's actually 4 pages. Once you go to page two it then shows all numbers (1,2,3 & 4) but I'd like it to show all pages all the time.

Any ideas on how to do this?

Here's my code:

{paginate}
    <div class="top-strip subtle pagination actual_pagination">
        {pagination_links}
            <h3><span class="page-label">Page:</span>
                {page}
                    <a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}current{/if} pagination-button">{pagination_page_number}</a>
                {/page}
            </h3>
            <h3 class="right">
                {first_page}
                    <a href="{pagination_url}" class="page-first pagination-button">First</a>
                {/first_page}
                {previous_page}
                    <a href="{pagination_url}" class="page-previous pagination-button">Previous</a>
                {/previous_page}
                {next_page}
                    <a href="{pagination_url}" class="page-next pagination-button">Next</a>
                {/next_page}
                {last_page}
                    <a href="{pagination_url}" class="page-last pagination-button">Last</a>
                {/last_page}
            </h3>
        {/pagination_links}
    </div><!-- /end #top-strip -->
{/paginate}

Thanks in advance,

Tom

4

You want to mosey on over to page_padding land.

https://docs.expressionengine.com/v2/templates/pagination.html#id3

{pagination_links page_padding="10"}

{/pagination_links}

This will show up to 10 page numbers on either side of the current page in the pagination links.

2
  • Thanks @jrothafer, do you know which version page_padding was introduced with? – Tom Perkins Dec 14 '15 at 10:00
  • Nope, the term doesn't even show up in the change log for EE2, so I'm guessing sometime during EE1. – jrothafer Dec 14 '15 at 13:15

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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