On the blog abut creating blocks it says that "the variable $CI is automatically passed to the static view file and is a reference to the CodeIgniter super object"
In my block the first thing I do is try to load a model like this
<?php $CI->load->model('people_model'); ?>
But this gives me the error "Undefined variable: CI"
Any ideas what I am doing wrong?
Thanks
Comments
$CI = & get_instance();
Not sure why this works, read why it did a while back, but have forgotten. Maybe someone else can refresh? Cheers.