Welcome Guest, Not a member yet? Register   Sign In
Model --> Config or Model-->Controller-->View?
#5

[eluser]Angel Web Design[/eluser]
Or you could use the constructor method to get the data if it is required on every page and save it in an array, then pass the array through to the view.
Code:
__construct(){

    $this->data['my_menu'] = $this->my_model->get_menu();
}

function index(){
    $this->data['page_specific_data'] = "something";
    $this->load->view('index', $this->data);
}


Messages In This Thread
Model --> Config or Model-->Controller-->View? - by El Forum - 07-15-2011, 03:17 AM
Model --> Config or Model-->Controller-->View? - by El Forum - 07-15-2011, 03:36 AM
Model --> Config or Model-->Controller-->View? - by El Forum - 07-15-2011, 03:48 AM
Model --> Config or Model-->Controller-->View? - by El Forum - 07-16-2011, 01:15 AM
Model --> Config or Model-->Controller-->View? - by El Forum - 07-16-2011, 09:54 AM
Model --> Config or Model-->Controller-->View? - by El Forum - 07-16-2011, 09:50 PM



Theme © iAndrew 2016 - Forum software by © MyBB