[eluser]cahva[/eluser]
Yes you can, but in your example $this->data['pagetitle'] is defined after $this->load->view('header') and is not available in header view. $pagetitle would be available in the footer view though because $this->data['pagetitle'] is defined before that. But remember to pass $this->data to other views also or use $this->load->vars($this->data) which will enable all the variables to all views without sending it separately. For example:
Code:
$data = array('foo' => 'Bar');
$this->load->vars($data);
$this->load->view('header');
$this->load->view('content');
$this->load->view('footer');
Variable $foo would be available in all the views and you would not need to send the array separately to all views that need it. Like this:
Code:
$data = array('foo' => 'Bar');
$this->load->view('header',$data);
$this->load->view('content',$data);
$this->load->view('footer',$data);