Using $this->layout in Yii to Switch Layouts

Introduction In Yii, the $this->layout property is used to define which layout file should be applied to a view. By default, Yii uses @app/views/layouts/main.php as the layout, but you can dynamically change it within controllers or actions. Changing Layout in a Controller   To set a layout for an entire controller, assign a value to $this->layout […]

Read More