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