⚠ In case you've missed it, we have migrated to our new website, with a brand new forum. For more details about the migration you can read our blog post for website migration. This is an archived forum. ⚠

  •     

profile picture

Loading Data in a Specific view



shahzad
  • profile picture
  • Member

Posted 25 March 2016 - 00:49 AM

Hi, I have following basic controller made with the help of  GCRUD website. I have 2 views main_view which i load from the index method of main controller and our_template.php view to load the data. This is working fine. But when i try to load the data into first view which is in index method it does not load the data in this view. please see the code and guide me how can i load data in the view of my choice. my main goal is that when user login into main view he remains there while exploring all data. So one view should do all the job. main Controller example below

 
 
public function index()
    {
         $this->load->view('main_view');
                
    }
 
    public function employees()
 
        $crud = new grocery_CRUD();
        $crud->set_theme('flexigrid');
        $this->grocery_crud->set_table('employees');
        $output = $this->grocery_crud->render(); 
        $this->show_employee_output($output);        
    }
 
    function show_employee_output ($output = null)
 
    {
        $this->load->view('our_template.php',$output);    
    }