trylife 2015-05-05 09:10:17 45608次浏览 10条评论 54 19 0

方案1:控制器内成员变量

public $layout = false; //不使用布局
public $layout = "main"; //设置使用的布局文件

方案2:控制器成员方法内

$this->layout = false; //不使用布局
$this->layout = "main"; //设置使用的布局文件

方案3:视图中选择布局

$this->context->layout = false; //不使用布局
$this->context->layout = 'main'; //设置使用的布局文件

附视频:http://pan.baidu.com/s/1kTMhGqV

觉得很赞
您需要登录后才可以评论。登录 | 立即注册