<?php
/*** right is the public*/
$this->beginContent('@app/views/layouts/main.php');
/*上面就是你要继承的模板信息*/
?>
这里就是新模板的内容
<?php $this->endContent();?>

yii2怎么继承模板,这个好像可以无限继承的