I have a problem callback column
i want to change data image with my url
can u help me
public function banner(){ if($this->session->userdata('logged_in')){ $session_data = $this->session->userdata('logged_in'); $data['username'] = $session_data['username']; $this->load->view('home_view', $data); }else{ //If no session, redirect to login page redirect('login', 'refresh'); } $crud = new grocery_CRUD(); $crud->set_table('banner'); $crud->set_subject('banner'); $crud->columns('title','content','image'); $crud->set_field_upload('image','../images/banner'); $crud->set_field_upload('imageEng','../images/banner'); $crud->callback_before_insert(array($this,'set_value_banner')); $crud->callback_after_update(array($this, 'set_value_banner')); =>> $crud->callback_column('image',array($this,'image_url')); $output = $crud->render(); $this->banner_crud($output); } function banner_crud($output = null){ $this->load->view('banner_crud.php',$output); } function set_value_banner($post_array) { $post_array['image'] = 'banner/' . $post_array['image']; return $post_array; } function image_url(){ $path=base_url(); $image = "<img src='../images/banner"; return $image; }
Tx before :)