Re: [fw-general] Form values and paginator question
In mypaginator.phtml, you have something like that: a href=?= $this-url(array('page' = $page)); ? ?= $page; ? /a You must cznge parameters for $this-url(). For example: a href=?= $this-url(array_merge(array('page' = $page), $this-dataForPaginatorUrl)); ? ?= $page; ? /a And in controller: $this-view-dataForPaginatorUrl = array('searchstr' = $searchstr, 'adlocation' = $adlocation); or something else. regards, pch On Mon, Feb 16, 2009 at 08:03, Deepak Shrestha d88...@gmail.com wrote: 2. put your form values in the url but anyway I got the answer already. Not really My question is how to modify the view partial script of paginator control (mypaginator.phtml) so that it will send the form data along with requested page number Initially my url is http://myweb/search/?searchstr=adlocation=Anysubmit=Search but when next is clicked, url get changed to http://myweb/search/index/page/2 probably I need the url like this when clicked http://myweb/search/index/page/2/?searchstr=adlocation=Anysubmit=Search I took a look at the properties available for view partial http://framework.zend.com/manual/en/zend.paginator.usage.html#zend.paginator.usage.rendering.properties but no clue on how to set this. Need some hints. Thanks -- === Registered Linux User #460714 Currently Using Fedora 8, 10 === -- Paweł Chuchmała pawel.chuchmala at gmail dot com
Re: [fw-general] Form values and paginator question
2009/2/17 Paweł Chuchmała pawel.chuchm...@gmail.com: In mypaginator.phtml, you have something like that: a href=?= $this-url(array('page' = $page)); ? ?= $page; ? /a You must cznge parameters for $this-url(). For example: a href=?= $this-url(array_merge(array('page' = $page), $this-dataForPaginatorUrl)); ? ?= $page; ? /a And in controller: $this-view-dataForPaginatorUrl = array('searchstr' = $searchstr, 'adlocation' = $adlocation); or something else. regards, pch Doing this gives me an Warning like this: == Previous | 1 | Warning: array_merge() [function.array-merge]: Argument #2 is not an array = but i am sure it is array and I have verified that. Any suggestion? -- === Registered Linux User #460714 Currently Using Fedora 8, 10 ===
[fw-general] Form values and paginator question
Hi, I need some hint on using paginator with search form. If I have following code in my controller = if($request-isPost()) { if ($form-isValid($request-getPost())) { $req = $form-getValues(); $pageno = $request-getParam('page'); $this-showRequestedNews($req, $pageno); } } else { //what? //where do I get form values here if I were to issue showRequestedNews() function? } === When I click next in my paginator, it is not a posted request from Form anymore. so how does the next page is proceesed? Thanks -- === Registered Linux User #460714 Currently Using Fedora 8, 10 ===
Re: [fw-general] Form values and paginator question
Well there are some sollutions: 1. put the form values in a session. 2. put your form values in the url Deepak Shrestha wrote: Hi, I need some hint on using paginator with search form. If I have following code in my controller = if($request-isPost()) { if ($form-isValid($request-getPost())) { $req = $form-getValues(); $pageno = $request-getParam('page'); $this-showRequestedNews($req, $pageno); } } else { //what? //where do I get form values here if I were to issue showRequestedNews() function? } === When I click next in my paginator, it is not a posted request from Form anymore. so how does the next page is proceesed? Thanks -- === Registered Linux User #460714 Currently Using Fedora 8, 10 === - visit my website at http://www.phpscriptor.com/ http://www.phpscriptor.com/ -- View this message in context: http://www.nabble.com/Form-values-and-paginator-question-tp22021167p22022270.html Sent from the Zend Framework mailing list archive at Nabble.com.
Re: [fw-general] Form values and paginator question
On Sun, Feb 15, 2009 at 8:49 PM, PHPScriptor cont...@phpscriptor.com wrote: Well there are some sollutions: 1. put the form values in a session. 2. put your form values in the url Got that. :-) I was thinking other way round. Actually my question should be does paginator retains the previous query? but anyway I got the answer already. thanks -- === Registered Linux User #460714 Currently Using Fedora 8, 10 ===
Re: [fw-general] Form values and paginator question
2. put your form values in the url but anyway I got the answer already. Not really My question is how to modify the view partial script of paginator control (mypaginator.phtml) so that it will send the form data along with requested page number Initially my url is http://myweb/search/?searchstr=adlocation=Anysubmit=Search but when next is clicked, url get changed to http://myweb/search/index/page/2 probably I need the url like this when clicked http://myweb/search/index/page/2/?searchstr=adlocation=Anysubmit=Search I took a look at the properties available for view partial http://framework.zend.com/manual/en/zend.paginator.usage.html#zend.paginator.usage.rendering.properties but no clue on how to set this. Need some hints. Thanks -- === Registered Linux User #460714 Currently Using Fedora 8, 10 ===