Welcome Guest, Not a member yet? Register   Sign In
$this->load->vars()
#1

[eluser]kidego32[/eluser]
Hello,

I have the following code:

Code:
Class MY_Controller extends Controller {
    
    function MY_Controller() {

        parent::Controller();
        
        // setup default navigation data
        $data['uri_segment_one'] = $this->uri->segment(1);
        $data['uri_segment_two'] = $this->uri->segment(2);
        
        $data['nav1'] = $this->Navigation_model->getNavItems(0);
        $data['nav2'] = $this->Navigation_model->getNavItems($data['uri_segment_one']);
        $data['nav3'] = false;
        $data['nav_active'] = $data['uri_segment_two'];
        $data['title'] = "Door Application";
        
        $this->load->vars($data);
    }
}

I'm extending my application controllers from this MY_Controller. The problem is that I can't access this data in the index() function. Shouldn't this data be available, or am I going about this the wrong way?

Julio


Messages In This Thread
$this->load->vars() - by El Forum - 11-19-2008, 12:44 PM
$this->load->vars() - by El Forum - 11-19-2008, 01:10 PM
$this->load->vars() - by El Forum - 11-19-2008, 02:38 PM
$this->load->vars() - by El Forum - 11-20-2008, 06:01 AM
$this->load->vars() - by El Forum - 11-20-2008, 06:17 AM
$this->load->vars() - by El Forum - 11-20-2008, 06:27 AM
$this->load->vars() - by El Forum - 11-20-2008, 07:03 AM
$this->load->vars() - by El Forum - 11-20-2008, 07:14 AM



Theme © iAndrew 2016 - Forum software by © MyBB