Php Zend Framework 1中的布局
我正在尝试在ZF1中创建布局 application.iniPhp Zend Framework 1中的布局,php,zend-framework,layout,Php,Zend Framework,Layout,我正在尝试在ZF1中创建布局 application.ini resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/" resources.layout.layout = "default" Bootstrap.php protected function _initView() { $this->bootstrap('layout'); $layout = $this->getResou
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts/"
resources.layout.layout = "default"
Bootstrap.php
protected function _initView()
{
$this->bootstrap('layout');
$layout = $this->getResource('layout');
$view = $layout->getView();
$view->headTitle('default title');
return $view;
}
我有两个模块home和test,默认布局在home中工作,但在test中不工作。这两个模块都是相等的,只是为了学习ZF1
我应该做些不同的事情来设置我所有模块的默认布局吗
以防你需要它。这是modules/test/IndexController.php的代码
<?php
class Test_IndexController extends Zend_Controller_Action
{
public function init()
{
/* Initialize action controller here */
}
public function indexAction()
{
}
}
如果你需要更多信息,请告诉我。谢谢这不是布局问题。在视图中是一个代码问题
Hello, this is the test module