Re: Another pagination problem

2008-11-03 Thread Mathew

You have to add the query to the pagination helper by calling
$paginator->options(...)

In your controller you're using a POST to get the search query. I
recommend changing this to a GET so that it can be passed to other
pages as part of the URI

I do paginated search using a get like this /controlller/action?
q=search_term

I can then pass this to the paginate helper like this inside the view.

$paginator->options(array('url' =>array('?'=>'q='.$this->params['url']
['q'])));

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Re: Another pagination problem

2008-11-03 Thread [EMAIL PROTECTED]

This has been covered numerous times before.
http://groups.google.com/group/cake-php/search?q=search+pagination&;

If you have a specific issue related to this then please ask again.

/Martin


On Nov 3, 4:58 am, 0x1A4 <[EMAIL PROTECTED]> wrote:
> Hi all im relatively new to Cakephp.Currently im creating a web app
> for our in house usage to track and monitor tenders.My problem right
> now is im creating a search function.Whenever user submit strings to
> the search query it all went well.However the problem occur on
> pagination when the search result is more than 1 page.If the user
> navigate to the 2nd page it will ignore all the search query.Below is
> the pastebin of my code.Sorry for my bad english
>
> Controller codehttp://bin.cakephp.org/saved/39125
> View codehttp://bin.cakephp.org/saved/39126
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---



Another pagination problem

2008-11-02 Thread 0x1A4

Hi all im relatively new to Cakephp.Currently im creating a web app
for our in house usage to track and monitor tenders.My problem right
now is im creating a search function.Whenever user submit strings to
the search query it all went well.However the problem occur on
pagination when the search result is more than 1 page.If the user
navigate to the 2nd page it will ignore all the search query.Below is
the pastebin of my code.Sorry for my bad english

Controller code http://bin.cakephp.org/saved/39125
View code http://bin.cakephp.org/saved/39126

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
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
-~--~~~~--~~--~--~---