|
|||
|
I've been trying to render a different view than the default, so here's what I've done.
/game/applications/controllers/AccountController.php: PHP Code:
PHP Code:
Code:
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'test.phtml' not found in path (/game/application/views/scripts/account/)' in /var/www/game/library/Zend/View/Abstract.php:857 |
|
|||
|
Hmm, strange, now I get
Code:
Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script 'test/index.phtml' not found in path (../application/views/scripts/)' in /var/www/game/library/Zend/View/Abstract.php:857 PHP Code:
|
|
|||
|
You're creating a new Zend_View object in the action, but there is already a view created automatically. It is rendered at the end of the action function. You can suggest the view script it should run by giving instructions to the viewRenderer helper. eg.
Code:
$this->_helpers->viewRenderer->setScriptAction('test');
This will cause the "test.phtml" file to be rendered, assuming it is in the same directory as the default script. |
![]() |
| Thread Tools | |
| Display Modes | |
|
|