[eluser]coolant[/eluser]
I'd like the ability to have $data be used in all of the methods automatically without having to define it in each method. This would be how I would do it in non-CI. I tried creating a method called Home and putting the $data['cow'] in there, but no such luck.
Also, can I use $this->load inside this "construct" ?
Code:
class Home extends Controller {
public $data;
function __construct()
{
$data['cow'] = 'moo';
}
function foo()
{
$this->load->view('foo', $data);
}
function bar()
{
$this->load->view('bar', $data);
}
}
Thanks!