Zend Framework入門:共通レイアウトによるウェブサイトの管理

Zend Framework入門(13): 共通レイアウトによるウェブサイトの管理 – Zend_Layout-:CodeZine

最近はZend Framework上でもSmartyではなく、Zend_Layoutなどでやっております。
そこで、マニュアルざざっと見ただけだと、どうやって部品部分を作っていいのかわからなかったりわかったり。

[php]
class IndexController extends Zend_Controller_Action {
public function init {
//Zend_Layoutで使う変数 menu を menu.phtml から作成
$this->_helper->layout->assign(‘menu’, $this->view->render(‘menu.phtml’));
}
[/php]

と、こんな風に作るのかーというのが分かってよいチュートリアル。

関連する記事:

Powered by

Leave a Comment


NOTE - You can use these HTML tags and attributes:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">