-- Ethna_ActionClass から、Ethna_ViewClass#preforward に引数を渡せるようにした
--- return array('forward_name', $params); の形式で渡せば、$params が preforwardの引数として渡される
-- 汎用ビュークラスを実装
+--- ビューへの出力時によく使われる処理を雛形として実装したもの
--- Ethna_View_Json.php
+--- Ethna_View_404.php
+--- Ethna_View_500.php
+--- Ethna_View_Redirect.php
+---- アクションクラスで return array('redirect', 'http://example.com');
+ とすれば http://example.com にリダイレクトされる
+-- レイアウトテンプレートを実装
+--- HTMLの外側に当たる雛形のテンプレートを描くためのもの。各アクションの出力はこのテンプレートの出力でラップされる
+--- デフォルトは template/{locale_name/layout.tpl に置かれている。
+--- この機能はデフォルトで有効になっている。無効にしたければ、[appid]_ViewClass.php の $use_layout を false にする
*** bug fix
"app.url_handler.php" => sprintf("$basedir/app/%s_UrlHandler.php", $macro['project_id']),
"etc.ini.php" => sprintf("$basedir/etc/%s-ini.php", $macro['project_prefix']),
"template.index.tpl" => sprintf("$basedir/template/$locale/index.tpl"),
+ "template.layout.tpl" => sprintf("$basedir/template/$locale/layout.tpl"),
+ "template.404.tpl" => sprintf("$basedir/template/$locale/404.tpl"),
+ "template.500.tpl" => sprintf("$basedir/template/$locale/500.tpl"),
);
$skelfile_maps = array(
-<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
-<head>
-<meta http-equiv="Content-Type" content="text/html; charset={$client_enc}" />
-<link rel="stylesheet" href="{$config.url}css/ethna.css" type="text/css" />
-</head>
-<body>
-
<div id="header">
<h1>{$project_id}</h1>
</div>
<div id="footer">
Powered By <a href="http://ethna.jp">Ethna</a>-{$smarty.const.ETHNA_VERSION}.
</div>
-
-</body>
-</html>
--- /dev/null
+<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset={$client_enc}" />
+<link rel="stylesheet" href="{$config.url}css/ethna.css" type="text/css" />
+</head>
+<body>
+{$content}
+</body>
+</html>