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

我可以在cakephp中的div用户中加载一个操作吗?,cakephp,themes,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>&l

我是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>

...
...
但是这个模板很简单,
例如
我有用户\u控制器和视图、添加、删除和索引视图。
我希望在此图像中的用户div中加载用户操作


您可以使用$this->requestAction->()从Cake中的任何位置返回完全渲染的视图或数据


更多信息请参见。

我不太清楚您的问题是什么。如果您需要一个非蛋糕特定的HTML布局。PHP本身就是一个简单的模板。在控制器中调用$this->set(“foo”,“bar”),并在视图中生成。无论如何,我们不应该在视图中加入任何逻辑。