Hi Jaime,
the paginator helper has to know the parameters in order to create the
right links, so you have to pass them to the view and set them in the
"url"-option of the helper functions.
The passing options-array could look like:
array('url' => array('where:'.$city,
'name:'.$name)))
This would create urls like /search/companies/page:2/where:london/
name:bla and you could fetch the params in your controller with $this-
>params['named']. Not sure how to build the urls with GET parameters,
but this is at least one way it should work.
Hope this helps,
Michael
On 3 Sep., 15:52, Jaime <[EMAIL PROTECTED]> wrote:
> Hi there,
>
> I've built a search engine for my app and defined a route for it:
>
> Router::connect('/search/companies/*', array('controller' =>
> 'companies', 'action' => 'search'));
>
> The search box is a HTML form sent via GET method. So url are like
> this:
>
> /search/companies?where=london;name=bla
>
> Notice the search query: "where=london;name=bla". Cool. Now I try to
> paginate the results with my custon paginate() and paginateCount()
> methods.
>
> The problem is that the paginator helper is not appending the search
> query. So when I move to page 2 I am redirected to:
>
> /search/companies/page:2
>
> And the search query is lost. Checking router::url() doesn't bring
> any ligth into this.
>
> Any ideas?
--~--~---------~--~----~------------~-------~--~----~
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=en
-~----------~----~----~----~------~----~------~--~---