[eluser]Brokenegg.wb[/eluser]
Hey All,
I'm having some trouble with my pagination code, everything is working fine, pretty much, however my links have disappeared and i can't figure out how to get them back, here is my Controller Code:
Code:
function index()
{
$this->load->library('pagination');
$this->load->library('table');
$config['base_url'] = 'http://www.rareintaglio.com/index.php/store';
$config['total_rows'] = $this->db->get('items')->num_rows();
$config['per_page'] = 12;
$config['num_links'] = 7;
$config['full_tag_open'] = '<div id="pagination">';
$config['full_tag_close'] = '</div>';
$this->pagination->initialize($config);
if($query = $this->site_db_upload->get_records_store())
{
$data['records'] = $query;
}
$this->load->view('store', $data);
}
View Code:
Code:
<div id="shopnav">
<?php echo $this->pagination->create_links();?>
</div>
</div>
<div id="cbody">
<div id="itemrow">
<?php if(isset($records)) :foreach($records as $row): ?>
<div id="item1">
<div id="itmpic"></div>
<p>Item Name:<?php echo $row->item_name;?><br />
Attribution:<?php echo $row->attribution;?><br />
Material:<?php echo $row->material;?><br />
Date Acquired:<?php echo $row->date_acquired;?><br />
Price:<?php echo $row->price;?><br />
</p>
</div>
<?php endforeach; ?>
<?php else: ?>
<h2> Your search returned no results, please refine your search term and try again.</h2>
<?php endif;?>
and Model Code:
Code:
function get_records_store()
{
$config['base_url'] = 'http://www.rareintaglio.com/index.php/store';
$config['total_rows'] = $this->db->get('items')->num_rows();
$config['per_page'] = 12;
$config['num_links'] = 7;
$config['full_tag_open'] = '<div id="pagination">';
$config['full_tag_close'] = '</div>';
$this->db->select('item_name, attribution, material, age, date_acquired, price');
$query = $this->db->get('items', $config['per_page'], $this->uri->segment(3));
return $query->result();
}
anyone have any ideas?
Thanks,
Watson