-- Ralf Eggert <[email protected]> wrote
(on Wednesday, 12 September 2012, 02:31 PM +0200):
> I still have another problem with the pagination control view script. In
> my /module/User/view/user/admin/index.phtml I use this code:
> 
> <?php echo $this->paginationControl($this->userlist, 'Sliding',
> 'pagination/sliding', array('route' => 'user/page')); ?>
> 
> The pagination control view script lies in the file
> /module/Application/view/pagination/sliding.phtml and is referenced in
> my module.config.php like this:
> 
> 'view_manager' => array(
>     'template_map' => array(
>         'pagination/sliding' => __DIR__ .
> '/../view/pagination/sliding.phtml',
>     ),
> ),
> 
> When I run the application I get an "Unable to render template" error.
> 
> Where should the pagination control view script be placed and how can I
> configure it correctly?

That _should_ work -- we do exactly this on the ZF website (though with
template_path_stack, but it's the same idea). The only thing I can think
of is that the module is not telling the MVC about its config, or that
the view_manager config is nested when it shouldn't be.

 * Does Application\Module define a getConfig() method?
 * Is the 'view_manager' a top-level key in the config returned by that
   method?

-- 
Matthew Weier O'Phinney
Project Lead            | [email protected]
Zend Framework          | http://framework.zend.com/
PGP key: http://framework.zend.com/zf-matthew-pgp-key.asc

-- 
List: [email protected]
Info: http://framework.zend.com/archives
Unsubscribe: [email protected]


Reply via email to