Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7964011
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T05:46:03+00:00 2026-06-04T05:46:03+00:00

How to get Cake php default pagination to get first and last page pagination

  • 0

How to get Cake php default pagination to get first and last page pagination link

<p>
    <?php
    echo $this->Paginator->counter(array(
        'format' => __('Page %page% of %pages%, showing %current% records out of %count% total, starting on record %start%, ending on %end%', true)
    ));
    ?>    </p>

<div class="paging">
    <?php echo $this->Paginator->prev('<< ' . __('previous', true), array(), null, array('class' => 'disabled'));?>
    |     <?php echo $this->Paginator->numbers();?>
    |
    <?php echo $this->Paginator->next(__('next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
</div>

This will output

Page 1 of 89, showing 15 records out of 1326 total, starting on record 1, ending on 15

<< previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | next >> 

How would I get first and last page links also with default pagination

first | << previous | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | next >> | last
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T05:46:05+00:00Added an answer on June 4, 2026 at 5:46 am

    I tried this code and it is working in cakephp 1.3 for me:–

    <?php echo $this->Paginator->first(__('<< First', true), array('class' => 'number-first'));?>
    <?php echo $this->Paginator->numbers(array('class' => 'numbers', 'first' => false, 'last' => false));?>
    <?php echo $this->Paginator->last(__('>> Last', true), array('class' => 'number-end'));?>
    

    try to implement this…

    this is what you are looking for:–

            <?php echo $this->Paginator->first(__('First', true), array('class' => 'disabled'));?>
    |     <?php echo $this->Paginator->prev('<< ' . __('Previous', true), array(), null, array('class'=>'disabled'));?>
    |     <?php echo $this->Paginator->numbers(array('class' => 'numbers', 'first' => false, 'last' => false));?>
    |     <?php echo $this->Paginator->next(__('Next', true) . ' >>', array(), null, array('class' => 'disabled'));?>
    |     <?php echo $this->Paginator->last(__('Last', true), array('class' => 'disabled'));?>
    

    enter image description here

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

In cake php is how we can get order of query result according to
How do I get rid of the default CakePHP: the rapid development php framework
I can do this in any of my View file in Cake PHP: <?php
I have this code in cake php but it generates a bunch of labels
I am new to Cake PHP and this set up is giving me a
I tried register script for cake from here and i get this error: Fatal
I'm trying to get a CakePHP application to work. For this, I've set up
get an array of bluetooth ID's Broadcast the bluetooth signal manually
I get this 'error' when running PEVerify on a custom generated assembly. [MD](0x8013124C): Error:
Getting this. Site works fine locally, but up on production server I get this

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.