Welcome Guest, Not a member yet? Register   Sign In
Pagination help - missing back link on pages above 1
#1

[eluser]jasont[/eluser]
Pagination seems to be working however after clicking page 2, you see page 2 and the pagination links show the same page with no link back to page 1.

Any ideas?

(I'm using uri segment 4 due to using folders)

here's the code used

Code:
// blog - Controller
    function index()
    {

        $data['title'] = "My Real Title";
        $data['heading'] = "My Real Heading";
        $data['year'] = date('Y');
        
        $this->load->model('blog/Blogmodel');

        // Build Pagination
        $this->load->library('pagination');
        $config['base_url'] = base_url().'index.php/blog/blog/index/';
        $config['total_rows'] = $this->db->count_all('posts');
        $config['per_page'] = '2';
        $config['full_tag_open'] = '<p>';
        $config['full_tag_close'] = '</p>';
        
        $this->pagination->initialize($config);
        
        $data['paging_links'] = $this->pagination->create_links();
        
        // Get DB Data
        $data['query'] = $this->Blogmodel->get_last_ten_entries($config['per_page'],$this->uri->segment(4));
        
        // Output
        $this->load->view('blog/blog_header', $data);
        $this->load->view('blog/blogview', $data);
        $this->load->view('blog/blog_footer', $data);
    }

Code:
// blogview - View
<h1>&lt;?php echo $heading;?&gt;</h1>
    
<h3>Posts</h3>    

<ul>
&lt;?php foreach($query as $item):?&gt;

<li>&lt;?php echo $item->title;?&gt;</li>

&lt;?php endforeach;?&gt;
</ul>
    
&lt;?php echo $paging_links; ?&gt;

Can't figure this one out. =/


Messages In This Thread
Pagination help - missing back link on pages above 1 - by El Forum - 02-25-2009, 03:09 PM
Pagination help - missing back link on pages above 1 - by El Forum - 03-07-2009, 08:42 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 01:03 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 01:08 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 01:37 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 01:48 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 02:43 AM
Pagination help - missing back link on pages above 1 - by El Forum - 03-09-2009, 08:55 AM
Pagination help - missing back link on pages above 1 - by El Forum - 06-10-2009, 02:55 AM
Pagination help - missing back link on pages above 1 - by El Forum - 06-10-2009, 03:07 AM



Theme © iAndrew 2016 - Forum software by © MyBB