Welcome Guest, Not a member yet? Register   Sign In
Using Pagination but with NO table ?
#4

[eluser]chefnelone[/eluser]
[quote author="clip" date="1280518899"]You will have to rewrite your view file. Instead of:
Code:
<?php echo $this->table->generate($records); ?>
You will need to do something like:
Code:
<?php foreach($records as $record): ?>
  <div class="entry">
    <h1>&lt;?php echo $record->title; ?&gt;</h1>
    <p>&lt;?php echo $record->content; ?&gt;</p>
  </div>
&lt;?php endforeach; ?&gt;
[/quote]

You're right, but you need to change this line also:
Code:
$data['records'] = $this->db->get('data', $config['per_page'], $this->uri->segment(3));

for this one:

Code:
$data['records'] = $this->db->get('data', $config['per_page'], $this->uri->segment(3))->result();


Messages In This Thread
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 06:00 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:35 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:41 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 08:56 AM
Using Pagination but with NO table ? - by El Forum - 07-30-2010, 10:33 AM



Theme © iAndrew 2016 - Forum software by © MyBB