我一直在试图在Kohana 3.2中使用动态视图,但没有成功。我在(元,内容和页脚)中使用了包含三个视图的以下布局视图。无法在浏览器中获取动态视图更新
视图/布局:
<html>
<head>
<?php echo $meta ?>
</head>
<body>
<?php echo $content ?>
<?php echo $footer ?>
</body>
<html>
我能够开始呈现没有问题(在$元视图里面出现值的默认值)所有三种意见,但后来在流我给你并将变量传递给新的$元视图,但视图不会在我的浏览器中更新。我启用了针对特定视图的日志记录(在变量已通过之后),看起来一切正常。
// Passing variables to view and rendering view in controller/layout
$this->template->meta = View::factory('meta');
$this->template->meta->url = $this->template->art->url;
$this->template->meta->name = $this->template->art->name;
$this->template->meta->image = $this->template->art->image;
$this->template->meta->about = $this->template->art->about;
$this->response->body($this->template->meta);
Kohana::$log->add(Log::INFO, 'TEMPLATE VALUE: ' . $this->template);
如何强制更新视图中的特定视图,或者如何替换视图?
显示你的控制器请 – biakaveron 2012-03-24 10:01:24