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

  • SEARCH
  • Home
  • 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 8798487
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T00:06:31+00:00 2026-06-14T00:06:31+00:00

I’d like to be able to display all records without the actual need of

  • 0

I’d like to be able to display all records without the actual need of pagination but still want to keep the functionality of having sortable column headers by using something like $this->Paginator->sort().

Currently I’m setting 'limit' => 100 because I know I won’t ever have about more than about 50 records at a time and this works just fine, however I wanted to know if there was basically a way to accomplish the sortable columns without pagination some other way such as 'limit' => unlimited or another Component of CakePHP that would accomplish this.

Here’s the Controller:

class GroupsController extends AppController {

    public function view($slug = null) {

        $group = $this->Group->findBySlug($slug);

        $this->paginate = array(
            'Person' => array(
                'conditions' => array('Person.group_id' => $group["Group"]['id']),
                'limit' => 100,
                'recursive' => 0
            )
        );

        $people = $this->paginate('Person');

        $this->set('people', $people);

    }
}        

Here’s the view:

<table>
    <tr>
        <th><?php echo $this->Paginator->sort('Person.id','Id'); ?></th>         
        <th><?php echo $this->Paginator->sort('first_name', 'First Name'); ?></th>         
        <th><?php echo $this->Paginator->sort('last_name', 'Last Name'); ?></th>         
    </tr>
    <!-- Here is where we loop through the people -->
    <?php foreach ($people as $person): ?>
    <tr>
        <td><?php echo $person['Person']['id']; ?></td>
        <td><?php echo $person['Person']['first_name']; ?></td>
        <td><?php echo $person['Person']['last_name']; ?></td>
    </tr>
    <?php endforeach; ?>
    <?php unset($player); ?>
</table>
  • 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-14T00:06:32+00:00Added an answer on June 14, 2026 at 12:06 am

    It’s the pagination component that handles the column sorting. If you don’t want to use the paginator (why not?) you’ll have to write your own code to do it.

    One minor tweak you could do to your code is:

    'limit' => $this->Group->find('count')
    

    Which will ensure you always have enough of limit to display the full table.

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

Sidebar

Related Questions

I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function
I want to count how many characters a certain string has in PHP, but
I have a French site that I want to parse, but am running into
In my XML file chapters tag has more chapter tag.i need to display chapters
I want to construct a data frame in an Rcpp function, but when I
I would like my Web page http://www.gmarks.org/math_in_e-mail.txt on my Apache 2.2.14 server to display
I need to clean up various Word 'smart' characters in user input, including but
i want to parse a xhtml file and display in UITableView. what is the
Let's say I'm outputting a post title and in our database, it's Hello Y&#8217;all
For some reason, after submitting a string like this Jack’s Spindle from a text

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.