0

I have extended the Zend paginator so I can use it in my own service layer. The issue is getting it to display in my view. (My admin page is not in a view/script folder but in a some legacy code in public - don't ask lol). I have got an instance of view from the bootstrap and I am trying to display the paginator.

Fatal error: Uncaught exception 'Zend_View_Exception' with message 'no view script directory set; unable to determine location for view script' in /usr/share/php/Zend/View/Abstract.php:973

$adapter = new Think_Paginator_Adapter_ServiceQuery($logging, 'getAllActions');
    $paginator = new Zend_Paginator($adapter);
<table>
<?php foreach($paginator as $data){ ?>
                    <tr>
                    <td><?php echo $data->adminId ?></td>
                    <td><?php echo $data->lastName ?></td>
                    <td><?php echo $data->firstName ?></td>
                    <td><?php echo $data->loanId ?></td>
                    <td><?php echo $data->createTimestamp ?></td>
                    <td><?php echo $data->action ?></td>
                    </tr>    
                <?php } ?>
                    <?php 
                   echo $view->paginationControl($paginator,
                                    'Sliding',
                                    'pagination.phtml');
                   ?>
                </table>

Any idea why it's not finding my pagination.phtml in the view/scripts dir?

Thanks

4

1 回答 1

0

分页器没有问题,应用程序找不到默认脚本路径,也许试试

$view->addScriptPath('PATH');

或者

$view->setScriptPath('PATH').

您可能在引导程序中破坏了某些东西。

于 2013-06-13T08:18:58.557 回答