想法如下:
有时候我觉得用views中的参数来决定用哪个layout
这样子该怎么做呢?
frontend/views/page/xxx.php$this->layout='main';
报错
<?php include("../layouts/main.php"); ?>
报错
该怎么做呢?
由view倒置决定使用哪个layout怎么做到?
解决方法:
$this->context->layout='page';
Copyright 2014-2025 https://www.php.cn/ All Rights Reserved | php.cn | 湘ICP备2023035733号
走同样的路,发现不同的人生