pr($this->params); in the view, then you will know what to merge with
the pagination url options

On Apr 11, 11:52 pm, OldWest <ja...@jasonwydro.com> wrote:
> I have a search form.
>
> The form values are passed to query and results are displayed as expected.
>
> I am using Cakes built in pagination methods.
>
> On the initial search, I need the url to reflect the search path values as
> when I use the sort() or Next >> pagination methods.
>
> When I use sort() or Next >>, my url is formatted with the paginator
> structure like:
>
>    // pagination to Next page note Page 2
> ...plans/search/55/22/1/0/33758/page:2
>
> When I do the first search I get url:
>
> ...plans/search/
>
> Here are the appropriate fragments of my search action:
>
> function search(
> ...
> // query and other action code here unrelated to pagination
> ...
> // start of applicable array and pagination code
> $url = array('controller' => 'plans', 'action' => 'search');
> $this->paginate = $options; // $options is my query
> $this->set('searchdetails', array_merge($url, $searchdetails)); 
> //$searchdetails isi  any array of the values entered in the search input 
> boxes. Joining my url and search details.
> $this->set('plans', $this->paginate('Plan'));
>
> I tried to break down the above to ONLY include what is applicable to my
> problem.
>
> NOTE: I am running a default "order" through this action in my query and its
> working fine, but is not reflected in the url.
>
> I need to know how to update the url to reflect the initial search input
> results. I have ALL of the array data passed to my view just fine.
>
> I tried recreating the path with a rather large method I wrote, but it did
> nothing but complicate my problem...
>
> Is there a simple Cake type solution for this? Or is this just not in Cakes
> cards currently?
>
> Please set me straight on this.

-- 
Our newest site for the community: CakePHP Video Tutorials 
http://tv.cakephp.org 
Check out the new CakePHP Questions site http://ask.cakephp.org and help others 
with their CakePHP related questions.


To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php

Reply via email to