Welcome Guest, Not a member yet? Register   Sign In
Application structure?
#4

[eluser]Rein[/eluser]
Thanks for the replies.

I tried searching for MY_Controller and found out I can run code for all of my controllers. I came up with the following code;

Code:
<?php
class MY_Controller extends Controller{
        
    function MY_Controller()
    {
        parent::Controller();
        echo 'test';        
        $this->load->model('Modules');
        $data['modulelist'] = $this->Modules->getmodules();
    }

}
?>

Every controller from within my controller-folder now calls the echo, but the $modulelist is not available for use in my views. What's wrong here?

Thank you!


Messages In This Thread
Application structure? - by El Forum - 04-18-2010, 05:38 AM
Application structure? - by El Forum - 04-18-2010, 12:46 PM
Application structure? - by El Forum - 04-18-2010, 02:16 PM
Application structure? - by El Forum - 04-18-2010, 04:13 PM
Application structure? - by El Forum - 04-18-2010, 04:20 PM
Application structure? - by El Forum - 04-18-2010, 04:25 PM
Application structure? - by El Forum - 04-18-2010, 04:27 PM



Theme © iAndrew 2016 - Forum software by © MyBB