Pagination problem

edited February 2011 in Modules
I am trying to use the paginate function for the news part of the site.
$this->examples_model->paginate('per_page', ['offset'])
and i get this error:
Fatal error: Call to a member function paginate() on a non-object in /home/dev/public_html/fuelcms/fuel/application/views/aktuelt.php on line 14

this is the code on line 14:
$this->aktuelt_model->paginate(1, 0);

Any clues on what can be?

Comments

  • edited February 2011
    Have you loaded the model 'examples_model' beforehand using $CI->load->model('examples_model'); or $this->load->model('examples_model');
  • edited 10:34AM
    Yes I did $this->load->model('aktuelt_model'); but I have the same problem
  • edited 10:34AM
    What happens if you change the name of the file from aktuelt.php to aktuelt_model.php?
  • edited 10:34AM
    I did that no change I get the same error.
  • edited 10:34AM
    Are you able to call any other methods on that model? If not, it sounds like the model isn't loaded at the time you are calling it.
Sign In or Register to comment.