2009年7月17日星期五

Re: [fw-mvc] Assigning View Variables with Zend_Paginator

There's an undocumented fourth parameter for paginationControl().  It takes an associative array.

-Matt

On Thu, Jul 16, 2009 at 2:10 PM, Andrew Pace <andrewppace@gmail.com> wrote:
Thanks in advance for your help.

I am using zend paginator to deal with searches.  Before using Zend_Paginator, I would assign the search query to a view variable in my action controller "/search/products/".  For example:
       $search = ($this->getRequest()->getQuery('search');
       $this->view->search = $search;

I want this information so that I will be able to generate the URL that I need from within the included "paginator.phtml", not from within the normal view template.  For example:

       <?= $this->paginationControl($this->paginator, 'Sliding', 'paginator.phtml'); ?> //call from within 'products.phtml'


       $url= "/search/products/?search=testing&page=2"  //desired URL in 'paginator.phtml'

Any ideas?

Thanks,

Andrew

没有评论: