0
所以我使用标准的Zend布局为我的网站。我有许多自定义控制器和视图,并且显示了这些页面的内容,但是layout.phtml的head元素中的细节未显示。我是否需要手动将Zend_Layout与每个特定的控制器关联?我期望,因为布局是通过引导加载,这应该是免费的。Zend布局和引导
我app.ini文件有
# layout
resources.layout.layoutPath = APPLICATION_PATH "/layouts/scripts"
resources.layout.layout = "layout"
#resources.view[] =
# Views
resources.view.encoding = "UTF-8"
resources.view.basePath = APPLICATION_PATH "/views/"
我layout.phtml
<?php echo $this->doctype() ?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<?php echo $this->headTitle() ?>
<?php echo $this->jQuery();?>
</head>
<!-- application/layouts/scripts/layout.phtml -->
<body>
<div id="content">
<?php echo $this->layout()->content ?>
</div>
</body>
给我们的路径布局的目录。它真的在布局/脚本下吗? – 2009-07-26 14:28:09
(不确定)APPLICATION_PATH“/ default/layouts/scripts” – 2009-07-26 14:29:41