我可以在cakephp中的div用户中加载一个动作吗?

时间:2011-11-16 08:38:05

标签: cakephp themes

我是cakephp的初学者,我需要在cakephp中使用简单的模板 我有简单的代码:

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title><?php echo $title_for_layout?></title>
<link rel="shortcut icon" href="favicon.ico" type="image/x-icon">
<!-- Include external files and scripts here (See HTML helper for more info.) -->
<?php echo $scripts_for_layout ?>
</head>
<body>
<!-- If you'd like some sort of menu to
show up on all of your views, include it here -->
<div id="header">
<div id="menu">...</div>
</div>
<!-- Here's where I want my views to be displayed -->
<?php echo $content_for_layout ?>

<!-- Add a footer to each displayed page -->
<div id="footer">...</div>
</body>
</html>

但这个模板很简单,
例如
我有users_controller和查看,添加,删除和索引视图 我想在此图像中的用户div中加载用户操作。

enter image description here

1 个答案:

答案 0 :(得分:2)

您可以使用 $ this-&gt; requestAction-&gt;();

从Cake中的任何位置返回完全呈现的视图或数据

CakePHP manual中提供了更多信息。