Using a Paginator View Helper Partial in Another Module

Written by James Mansson on April 13, 2013 Categories: Zend Framework 1

In the Zend Framework, the Paginator View Helper looks by default for the partial specified under the views/scripts directory for the current module. If the partial is defined in one module (e.g. default) and used in another (e.g. admin), the module where it is located needs to be specified. For instance, you would use the following when rendering a pagination control defined in the default module from another module:

$this->paginationControl($this->paginator, 'sliding', 
  array('pagination_control.phtml', 'default'));

Note that rather than just specifying the partial file name as a string in the third parameter, we pass an array with the partial file name as the first entry, and module name as the second.

No Comments on Using a Paginator View Helper Partial in Another Module

Leave a Reply

Your email address will not be published. Required fields are marked *