Welcome Guest, Not a member yet? Register   Sign In
Pagination link won't work. [SOLVED]
#1

[eluser]solid9[/eluser]
I built a site that will display the paginator
on the front page of the site.

When I click the 1,2,3,4... links it won't work.

The frontpage is using
Code:
$config['base_url'] = 'http://sample.com/';

And when I click the 1,2,3,4... links the
Code:
$config['base_url'] = 'http://sample.com/main/front_paginator';


So what is the easy fix for this?




#2

[eluser]solid9[/eluser]
By the way here are the codes for the pagination,
Code:
function front_paginator() {
  $tmpl = array (
                    'table_open'          => '<table border="0" cellpadding="4" cellspacing="0" class="fp">',

                    'heading_row_start'   => '<tr>',
                    'heading_row_end'     => '</tr>',
                    'heading_cell_start'  => '<th class="fp">',
                    'heading_cell_end'    => '</th>',

                    'row_start'           => '<tr>',
                    'row_end'             => '</tr>',
                    'cell_start'          => '<td class="fp">',
                    'cell_end'            => '</td>',

                    'row_alt_start'       => '<tr>',
                    'row_alt_end'         => '</tr>',
                    'cell_alt_start'      => '<td class="fp">',
                    'cell_alt_end'        => '</td>',

                    'table_close'         => '</table>'
              );
  $this->table->set_template($tmpl);  
  
  $this->table->set_heading('Id', 'Date', 'Offering', 'Seeking');
  $config['base_url'] = 'http://sample.com/main/front_paginator';
  $config['total_rows'] = $this->db->get('swap')->num_rows();
  $config['per_page'] = 10;
  $config['num_links'] = 20;
  $config['full_tag_open'] = '<div id="pagination">';
  $config['full_tag_close'] = '</div>';
  
  $this->pagination->initialize($config);
  $this->data['records'] = $this->db->get('swap', $config['per_page'], $this->uri->segment(3));
}

#3

[eluser]solid9[/eluser]
When I press number 2 (2nd page)
The page goes white.

?
#4

[eluser]solid9[/eluser]
Okay I fixed my own problem.





Theme © iAndrew 2016 - Forum software by © MyBB