2008年9月9日星期二

Re: [fw-mvc] Identify module for Zend_Paginator's partial view script

Hi Tuan,

I've filed a ticket for this issue:


-Matt

On Tue, Sep 9, 2008 at 8:17 AM, Tuan Ngo <tuannm79@gmail.com> wrote:
Hi List,

I have a need to share partial view script of paginator between modules. But it seems that the current implementation of Zend_View_Helper_PaginationControl only allow view script to use paginator's partial view in the same module.

class Zend_View_Helper_PaginationControl
{
...
    public function paginationControl(Zend_Paginator $paginator = null, $scrollingStyle = null, $partial = null, $params = null)
    {
...
        return $this->view->partial($partial, $pages);
    }
}

So I change the code of Zend_View_Helper_PaginationControl a little bit for adding module of partial view parameter:
    public function paginationControl(Zend_Paginator $paginator = null, $scrollingStyle = null,$partialModule = null, $partial = null, $params = null)
    {
..
        return $this->view->partial($partial,$partialModule, $pages);
    }
And then I can point PaginationControl helper to a common module:
{$this->paginationControl($paginator,'Sliding','common','_partials/item_pagination_control.phtml')}

So the question is:

- Tuan Ngo.


没有评论: