[eluser]Silencez[/eluser]
Hi! I'm new with CI...
It must be a clean way to do this...
But, while you find it, you can try this:
(Just create a custom controller in application/library)
Code:
<?php
class MY_Controller extends Controller
{
var $autoload_models = array
(
'My_alias' => 'Model_with_long_name',
'Another_alias' => 'Another_model_with_alias',
'Model_without_alias'
);
function MY_Controller()
{
parent::Controller();
foreach($this->autoload_models as $alias => $model_name)
{
if(is_int($alias))
{
$this->load->model($model_name);
}
else
{
$this->load->model($model_name, $alias);
}
}
}
}