public function before() { // load the template $this->template = \View::factory('template'); // init CRUD controller if (\Request::active()->controller == 'crud') { // redirect to crud/error if errors were found if (!Init::all() and \Request::active()->action != 'error') { \Response::redirect('crude/crud/error'); } } $this->template->set('modal_msg', \Session::get_flash('modal_msg')); $this->template->set('site_name', $this->site_name); return parent::before(); }