0

i want to display pagination in blog section like following way

 <previous 1 2......7 next>

Can anyone help me for display pagination like above pattern

Thank You. Dhvanit N. Dave

1 Answer 1

2

If you check the documentation you'll find an example that is essentially exactly what you are looking for.

{paginate}
  {pagination_links}
    <ul>
      {first_page}
        <li><a href="{pagination_url}" class="page-first">First Page</a></li>
      {/first_page}

      {previous_page}
        <li><a href="{pagination_url}" class="page-previous">Previous Page</a></li>
      {/previous_page}

      {page}
        <li><a href="{pagination_url}" class="page-{pagination_page_number} {if current_page}active{/if}">{pagination_page_number}</a></li>
      {/page}

      {next_page}
        <li><a href="{pagination_url}" class="page-next">Next Page</a></li>
      {/next_page}

      {last_page}
        <li><a href="{pagination_url}" class="page-last">Last Page</a></li>
      {/last_page}
    </ul>
  {/pagination_links}
{/paginate}

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.