Cyber wrote:
> 
> I've just switch from ZF 0.9 to 1.0RC1 and have problems with pathes to
> view scripts.
> At this moment i've got directory structure like above
> 
> ./
>  /application
>     ./admin
>        ./controllers 
>        ./model
>        ./view
>               ./index               <- index controller for module admin
>                   index.php        <- and index action
> 
> I've wrote plugin to call setScriptPath and add it to view object but when
> i'm calling method it says:
> 
> 
> Fatal error: Uncaught exception 'Zend_View_Exception' with message 'script
> 'index/index.phtml' not found in path' in
> E:\Localhost\DVDCollector\library\Zend\View\Abstract.php:853 Stack trace:
> #0 E:\Localhost\DVDCollector\library\Zend\View\Abstract.php(764):
> Zend_View_Abstract->_script('index/index.pht...') #1
> E:\Localhost\DVDCollector\library\Zend\Controller\Action\Helper\ViewRenderer.php(702):
> Zend_View_Abstract->render('index/index.pht...') #2
> E:\Localhost\DVDCollector\library\Zend\Controller\Action\Helper\ViewRenderer.php(723):
> Zend_Controller_Action_Helper_ViewRenderer->renderScript('index/index.pht...',
> NULL) #3
> E:\Localhost\DVDCollector\library\Zend\Controller\Action\Helper\ViewRenderer.php(770):
> Zend_Controller_Action_Helper_ViewRenderer->render() #4
> E:\Localhost\DVDCollector\library\Zend\Controller\Action\HelperBroker.php(160):
> Zend_Controller_Action_Helper_ViewRenderer->postDispatch() #5
> E:\Localhost\DVDCollector\library\Zend\Controller\Action.php(504):
> Zend_Controller_Action_HelperBroker->notifyPostDispatch() #6 in
> E:\Localhost\DVDCollector\library\Zend\View\Abstract.php on line 853
> 
> 
> Of course i've changed view scripts extensions to phtml but it doesn't
> work :/
> 

Dear Cyber,

I think you have to add a folder named 'scripts' underneath your view and
place the folder index under this to hold your *.phtml files. Don't forget
to name your controller in controllers folder
Modulename_ControllernameController.
I am running with the directory structure
'\application\modules\modulename\views\scripts\controllername\view.phtml'
and it just works fine...straight out of the box. Of course the view.phtml
name will be your actionname.phtml.

Allan Vernon
-- 
View this message in context: 
http://www.nabble.com/Problem-with-path-in-Zend_View-tf3856701s16154.html#a10932068
Sent from the Zend Framework mailing list archive at Nabble.com.

Reply via email to