php - How to use custom layout in Yii2? -
i want use 3 templates yii. have files these:
./views/layouts/main-template-1.php ./views/layouts/main-template-2.php ./views/layouts/main-template-3.php
what may apply of layouts? because use 3 templates web. in advance
simply place in controller or controller's action
$this->layout = 'main-template-1'; // or 2 or 3
Comments
Post a Comment