I have a controller which, within a method, I want to specify a different layout for my view. I would have thought the below would do the trick, however, I am getting:
Attempt to assign property of non-object
on the line where I am trying to reset the layout.
class My_controller extends Base_Controller {
public $layout = "cms::layouts.default";
............
public function get_list($status = "open")
{
$this->layout = 'cms::layouts.nowrap';
$this->layout->strContent = View::make('cms::partials.orderdetails')
->with('xxxx', \CMS\XXX::method($xxx));
}
.................
}
Any ideas? I'm using Laravel 3 for this one