function barebones($offset = 1)
 {
     $base_paginator = new Iceo_paginator_base();
     $base_result = $base_paginator->create_links($offset);
     $template_data['content'] = '<pre>' . print_r($base_result, true) . '</pre>';
     $this->load->view('paginator/mainPage', $template_data);
 }
 public function create_links($offset = 0)
 {
     // Calculate current page based on $offset and number of rows per page
     $current_page = (int) ($offset / $this->rows_per_page) + 1;
     // Call base paginator link creation method.
     // We will process it's result afterwords to fit our
     // dataset navigation intentions.
     $pagination = parent::create_links($current_page);
     /*
      * Go through generated page numbers
      * and replace them with equivalent row offsets
      */
     $page_links = array();
     foreach ($pagination as $key => $pagination_item) {
         /*
          * We use is_array() here to distinguish
          * between 'page_links' and navigation links.
          */
         if (is_array($pagination_item)) {
             // Only $pagination['page_links'] is array
             foreach ($pagination_item as $page_link) {
                 // This converts page number to row offset.
                 $link_offset = ($page_link['number'] - 1) * $this->rows_per_page;
                 // We chose to show row offset here instead of page number.
                 // Comment this out if you want page number instead
                 //$page_link['number'] = $link_offset;
                 // Only change link if it is not disabled
                 if ($page_link['link'] != 'disabled') {
                     $page_link['link'] = $this->build_link($link_offset);
                 }
                 $page_links[] = $page_link;
             }
         } else {
             // Elements that are not array are 'first', 'prev', 'next' and 'last'
             if ($pagination_item != 'disabled') {
                 // Page number to row offset.
                 $pagination_item = ($pagination_item - 1) * $this->rows_per_page;
                 $pagination_item = $this->build_link($pagination_item);
                 $pagination[$key] = $pagination_item;
             }
         }
     }
     $pagination['page_links'] = $page_links;
     return $pagination;
 }