Hi Michael, Here's my workflow for that, I'm not sure if this is applicable to you though.
1.) I create an element containing a form that posts to the results page/action (http://example.com/search/results) 2.) In the results action, since values from $this->data are posted, I do a redirect back to the same action like array('controller' => 'search', 'action' => 'results, 'query => $query) where $query contains the search string 3.) On re-entry of the action, I get the search string by $this->params ['named']['query'] and run it through the database, then setting the results to the view 4.) On the view page, I set $paginator->options(array('url' => $this- >passedArgs)) somewhere near the top of the file. This is actually the most important that answers your questions. If you have another method to display and paginate the results, then make sure to use $paginator->options() to retain the named parameters. Cheers, OJ On Nov 11, 11:15 am, Michael Gaiser <[email protected]> wrote: > So I want to display all the results from my table that are like the search > string. Since there is a lot, I am using the paginate functions so we only > display 20 at a time. This works fine, but once I click the link to the next > 20 results, it loses the search string because it was originally pulled from > $this-data[] and I guess that is lost the 2nd time the paginate function is > run. Does anyone know a work around for this or am I doing it wrong? > > ~MG -- You received this message because you are subscribed to the Google Groups "CakePHP" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/cake-php?hl=.
