0
我试图在我的ZF应用程序中更改布局的原始路径。在Zend Framework中更改原始布局路径
$viewsPath = '../application/_layouts';
$options = array('layoutPath' => $viewsPath, 'layout' => 'layout');
Zend_Layout::startMvc();
//Initializing Zend_View
$view = Zend_Layout::getMvcInstance()->getView();
$view->setBasePath($viewsPath);
ZF试图找到/应用/ _layouts /脚本
在Zend_View_Abstract来解析addBasePath()
使得$this->addScriptPath($path . 'scripts');
我需要自行/应用/ _layouts的使用/application/_layouts/layout.phtml布局/ 脚本 /layout.phtml
如何让ZF在不重新加载的情况下忽略'scripts'文件夹Zend_View_Abstract::addBasePath()
?
哦!对不起。我已经花了2个小时对它:( 但问题出现在Zend_Layout :: startMvc(** $ options **); – aloneibreak
替代 - 在你使用zend_application的情况下 - 你可以使用ini-directive:'resources.layout .layoutPath = APPLICATION_PATH“/ layouts/scripts /”'并根据需要更改路径 – Sam