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.
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:
- Is there anyway to share partial view of paginator between module?
- Or if I use a wrong svn url? I try http://framework.zend.com/svn/framework/standard/trunk/library/Zend and http://framework.zend.com/svn/framework/standard/branches/release-1.6/library/Zend , but it looks the same as I describe above.
- Tuan Ngo.
没有评论:
发表评论