create_links() making a fatal error - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived Development & Programming (https://forum.codeigniter.com/forumdisplay.php?fid=23) +--- Thread: create_links() making a fatal error (/showthread.php?tid=14537) |
create_links() making a fatal error - El Forum - 01-06-2009 [eluser]Märt[/eluser] I'm trying to use paginate class but one function is causing a error. If I write a following thing: $this->paginate->create_links() then I get following error: Fatal error: Call to a member function create_links() on a non-object in... Everything else is working when I remove that line. I use it in model: $page = array('posts_listing' => $posts_page, 'make_links' => $this->paginate->create_links()); If more details are needed then I can give them. Hopefully someone can help me. Thank You! create_links() making a fatal error - El Forum - 01-06-2009 [eluser]therealmaloy[/eluser] mart kindly check the loading of your pagination library. and to use it, it might be something like this: Code: $this->load->library('pagination'); let us know what happen. create_links() making a fatal error - El Forum - 01-07-2009 [eluser]Märt[/eluser] Paginate library is loaded correctly, because I tested it by entering offsets manually to url: blog/index/5 for example (when I'm not using create_links function). If I use create_links() function then I get this fatal error. Everything else is working. This is my controller that loads module: Code: function index() This is my model: Code: <?php Hopefully you understand what I'm trying to say. create_links() making a fatal error - El Forum - 01-07-2009 [eluser]therealmaloy[/eluser] Mart change this: Code: $page = array('posts_listing' => $posts_page, to this: Code: $page = array('posts_listing' => $posts_page, check out the $this->pagination not $this->paginate, remember you loaded a pagination class not paginate class, as i've stressed on my first post... try this again and let us know... create_links() making a fatal error - El Forum - 01-07-2009 [eluser]Märt[/eluser] Sorry, I didn't noticed that at yours first post. That worked nicely. I guess I need to read more carefully :lol: Anyway. Thank you! |