public $layout = false; //不使用布局
public $layout = "main"; //设置使用的布局文件
$this->layout = false; //不使用布局
$this->layout = "main"; //设置使用的布局文件
$this->context->layout = false; //不使用布局
$this->context->layout = 'main'; //设置使用的布局文件
原文:https://www.cnblogs.com/alisleepy/p/11200345.html