Reputation: 73
I need all actions Add() have the same layout. There is a way to have that without editing every single action Add() in every single controller?
Upvotes: 0
Views: 128
Reputation: 60503
Use the beforeFilter()
callback in your app controller, check the action name, and set the layout accordingly.
public function beforeFilter()
{
if($this->request->param('action') === 'add') {
$this->layout = 'some_layout';
}
}
See also
Upvotes: 1