[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()
{
parent::Controller();
$this->load->model('Autodb_model', 'autodb');
$this->load->library('session','pagination');
}
and within the controller, is my method for displaying an inventory:
Code:
function client_side()
{
// client side inventory view.
// This is VERY similar to the live() method
// which retrieves the data we need for current
// live vehicles. Let's grab this data.
$data['opts'] = $this->autodb->get_vehicle_options();
// config params for pagination
$config['base_url'] = 'http://'.base_url().'/inventory/client_side';
$config['total_rows'] = count($data['opts']);
$config['per_page'] = '10';
$config['uri_segment'] = 2;
$this->pagination->initialize($config);
$this->load->view('client/inventory_view', $data);
}
[/code
Then within my view I execute the following code:
[code]
<!--<h5><a href="#">1</a> <a href="#">2</a> <a href="#">3</a> <a href="#">Next</a> <a href="#">>></a></h5>-->
<?= $this->pagination->create_links() ?>
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