2009年7月16日星期四

[fw-mvc] Assigning View Variables with Zend_Paginator

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

没有评论: