Using Pagination but with NO table ? - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: Archived Discussions (https://forum.codeigniter.com/forumdisplay.php?fid=20) +--- Forum: Archived General Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=21) +--- Thread: Using Pagination but with NO table ? (/showthread.php?tid=32659) |
Using Pagination but with NO table ? - El Forum - 07-30-2010 [eluser]chefnelone[/eluser] Hello I have this code to do pagination using tables. I'd like to know how to do it using DIVs instead of TABLE How can I grab the sent data from the view? controller: site.php Code: function index() VIEW: views/site_view.php Code: <div> Using Pagination but with NO table ? - El Forum - 07-30-2010 [eluser]arthurhanlon[/eluser] Hey there, look at the section here: http://ellislab.com/codeigniter/user-guide/libraries/pagination.html on customizing the pagination links at the bottom. Hope this helps, Arthur Using Pagination but with NO table ? - El Forum - 07-30-2010 [eluser]clip[/eluser] You will have to rewrite your view file. Instead of: Code: <?php echo $this->table->generate($records); ?> Code: <?php foreach($records as $record): ?> Using Pagination but with NO table ? - El Forum - 07-30-2010 [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); ?> Code: <?php foreach($records as $record): ?> 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(); Using Pagination but with NO table ? - El Forum - 07-30-2010 [eluser]chefnelone[/eluser] Pagination: how can I hide: first_link and last_link ?? With this I can set the text for them: Code: $config['first_link'] = 'Start'; but I need to hide them, I tried with (but nope) Code: $config['first_link'] = FALSE; |