Pagination inquiry for this n00b! |
[eluser]stevefink[/eluser]
Yay, I'm officially labeling myself a n00b. :-) I appreciate the time anyone who enters a thread with 'paginatin' in the topic as well. :-) Either way, here it is plain and simple. My controller's constructor looks like this: Code: function inventory() and within the controller, is my method for displaying an inventory: Code: function client_side() Any idea why the pagination class isn't properly being loaded? --- A PHP Error was encountered Severity: Notice Message: Undefined property: Inventory::$pagination Filename: controllers/inventory.php Line Number: 67 Thanks for looking, folks! - sf
[eluser]stevefink[/eluser]
Well, it works fine when I put: Code: $this->load->library('pagination'); into the method, not sure why I can't use $this->load->library('session','pagination'); in the constructor. Would love to learn if anyone feels like schooling me. :-)
[eluser]Michael Wales[/eluser]
The library method of the Loader class accepts parameters as the second parameter. Therefore this line: Code: $this->load->library('session','pagination'); You got your helper() and library() methods a bit confused - it happens to me all the time.
[eluser]stevefink[/eluser]
Thanks Michael! How're ya doing btw? Just finishing up http://www.f1autoimports.com before I submit it as my first completed CI project. (few things on the CSS side I need to fix up) but I'm almost there. Got pagination working btw, thank you greatly to also CodeOfficer on IRC. :-) http://www.f1autoimports.com/inventory Still haven't started my next project. I'm still contemplating between CI/EE or ZenCart for my shopping cart... aaaaah!!! The decision is KILLING ME! I so want to stay with this community, :-( Just hard to avoid a product that caters to a cart specifically...
[eluser]Michael Wales[/eluser]
Check out EE's addons/plugins - I'm sure there is a cart module available. I've been thinking of switching to EE Core for my blog... just to learn my way around the system as I am considering using EE for a future project of mine.
[eluser]gunter[/eluser]
yes, you meant this: Code: $this->load->library(array('session','pagination')); |
Welcome Guest, Not a member yet? Register Sign In |