Skip to content

Instantly share code, notes, and snippets.

@gin1314
Created December 10, 2012 03:33
Show Gist options
  • Save gin1314/4248228 to your computer and use it in GitHub Desktop.
Save gin1314/4248228 to your computer and use it in GitHub Desktop.
PHP: CI: bootstrap pagination boilerplate code
<?php
$config = array(
'base_url' => site_url("csi_division/index"),
'total_rows' => 200,
'per_page' => 20,
'first_link' => 'First',
'first_tag_open' => '<li>',
'first_tag_close' => '</li>',
'last_link' => 'Last',
'last_tag_open' => '<li>',
'last_tag_close' => '</li>',
'next_link' => '&gt;',
'next_tag_open' => '<li>',
'next_tag_close' => '</li>',
'prev_link' => '&lt;',
'prev_tag_open' => '<li>',
'prev_tag_close' => '</li>',
'cur_tag_open' => '<li class="active"><a href="javascript:void;">',
'cur_tag_close' => '</a></li>',
'num_tag_open' => '<li>',
'num_tag_close' => '</li>',
'full_tag_open' => '<div class="pagination"><ul>',
'full_tag_close' => '</ul></div>',
);
$this->pagination->initialize($config);
$this->data['csi_division_all'] = $this->csi_division->get_all();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment