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