2009年3月25日水曜日
2009年2月12日木曜日
2009年2月8日日曜日
2009年2月4日水曜日
2008年11月20日木曜日
cakephp: レイアウトの使用
レイアウトの使用
/app/views/layouts/temp.thtml
<html>
<head>
<title><?=$title_for_layout?></title>
</head>
<body>
<?=$content_for_layout?>
</body>
</html>
コントローラー内
var $layout = "temp";
functon hoge(){
$this->pageTitle = "タイトル";
}
エレメントの使用
/app/views/elements/ele.thtml
テンプレート内
<?=$this->renderElement("ele",array("message" => "メッセージ"))?>
/app/views/layouts/temp.thtml
<html>
<head>
<title><?=$title_for_layout?></title>
</head>
<body>
<?=$content_for_layout?>
</body>
</html>
コントローラー内
var $layout = "temp";
functon hoge(){
$this->pageTitle = "タイトル";
}
エレメントの使用
/app/views/elements/ele.thtml
テンプレート内
<?=$this->renderElement("ele",array("message" => "メッセージ"))?>
2008年10月25日土曜日
CakePHP:Routes の定義
独自ルートの定義により、アプリケーションを指定した URL で動作させることができるようになります。独自のルーティングは、/app/config/routes.php ファイルの Router::connect() メソッドを使用して定義します。
http://book.cakephp.org/ja/view/542/Routes-%E3%81%AE%E5%AE%9A%E7%BE%A9
http://book.cakephp.org/ja/view/542/Routes-%E3%81%AE%E5%AE%9A%E7%BE%A9
登録:
投稿 (Atom)