How to set the layout from a view
1
Dec0
Dec0
A few minutes ago I came across a blog post by Jeremy Burns where he describes how to render different layouts depending on the controller. Although his solution is correct, there is an even better solution that follows the MVC concept.
You can set the layout inside your view. All you have to do is adding the following code:
<?php
$this->layout = 'your_layout';
?>
It’s easy, isn’t it?
No Comments
No comments yet.