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 7:26AM
    Yes I did $this->load->model('aktuelt_model'); but I have the same problem
  • edited 7:26AM
    What happens if you change the name of the file from aktuelt.php to aktuelt_model.php?
  • edited 7:26AM
    I did that no change I get the same error.
  • edited 7:26AM
    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.