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 7900473
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 3, 20262026-06-03T08:58:46+00:00 2026-06-03T08:58:46+00:00

I am using cakePHP and I am trying to get the paginator component to

  • 0

I am using cakePHP and I am trying to get the paginator component to pass the get variables, or passedargs, when you click through to different pages. I have a variety of different search input selectors which “filters” the results returned. This works on first view, but the moment I click on a different page, it shows all of the results.

I have the following setup for my paginator:

// In my controller class:
public $paginate = array('maxLimit' => 10, 'paramType' => 'querystring');

// Within my action method:
$this->paginate = array('conditions' => array(...),
                        order => array('Model.field ASC'),
                        'limit' => 20 
 );

 // Calling the paginator:
 $results = $this->paginate('Model');
 $this->set(compact('results'));

In my view file:

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

EDIT:
From my understanding it’s better to use the passedArgs, but I am a little unsure as to how to do this. My $this->passedArgs returns no results, so I am creating the passed parameters within my controller example. I also changed my form from Get to Post:

 $this->passedArgs["searchfield"] = $_POST["value"];

It passes the passedArgs now correctly in the pagination strip, but I am unsure as to how to build the paging conditions array now. In most cases users will not select default values example, one of the filters is date from and date to, and then a search input box, if I leave the dates it will still created the argumens and not return any results so in essence my url would be something like:

 http://localhost/site/controller/action/page:3/datefrom:0/dateto:0/searchFor:survey

Any assistance?

  • 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-03T08:58:48+00:00Added an answer on June 3, 2026 at 8:58 am

    You can pass by all parameters in the view with:

    $this->Paginator->options(array('url' => $this->passedArgs));
    

    or assign the params manually:

    $this->Paginator->options(array('url' => array("0", "1")));
    

    befor echoing the paginator

    See the CakePHP Cookbook for further Examples

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

Sidebar

Related Questions

I have a CakePHP application where I am trying to get a count of
I am using cakephp. I am trying get data from facebook using file_get_contents. I
I am using cakephp. I am trying to use httpsocket to get information. <?php
I am using CakePHP 2.0 and have been trying to setup a cronjob to
i am using cakephp facebook plugin. when i click login. i get the following
I'm using CakePHP/mysql to build my app and I'm trying to get a list
I am using cakephp and trying to pass an array from the view to
I'm using cakephp and trying to check if a table has data entered in
I'm using TCPDF in CakePHP and trying to make some background (grey) for few
i am trying to create a Radio button using Cakephp like the one the

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.