您的位置:首页 > 编程语言 > PHP开发

php 框架 yii control 中使用布局

2015-10-14 17:40 561 查看
使用views/layout/下的布局

class CountryController extends Controller
{
//    public $layout = false; //不使用布局
//public $layout boolean或者string类型
$this->renderPartial(['view', 'id' => $model->code]);
//该方法不使用布局
$this->redirect(['view', 'id' => $model->code])
//该方法使用布局默认main 通过$layout更改
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: