i want to load view using 1 global method in controller, 
this my method

```
private function render_view($view=NULL,$data){
      if ( ! file_exists(APPPATH.'views/pages/'.$view.'.php'))
    {
            // Whoops, we don't have a page for that!
            show_404();
    }
      $this->load->view('header/header',$this->data);
      $this->load->view('pages/'.$view, $this->data);
    }

public function index()
    {
      $this->data['title'] = 'Homepage';
      $this->render_view('home_content',$this->data);
    }

    public function shop()
    {

      $this->data['title']='Shoping';
      $this->render_view('shop',$this->data);
    }

```

this method called every link tag, like 

```
<li><a href="<?php echo base_url ()?>Pages/shop">Shop page</a></li>

```

and generating view shop. 
but i have problem, every time i clicked the result is always the object not found. 
can you help me, oh i'm sory for my rip english xoxoxo