Welcome Guest, Not a member yet? Register   Sign In
Pagination 404
#3

[eluser]clintonbeattie[/eluser]
Hi,

I've updated some of the code but it still doesn't work...
This is my base_url "http://localhost/blog/"

The view should now use $pagination_links but same thing is happening.

This is teh url when I click on link "2" in the pagination, "http://localhost/blog/2" . 404 is shown.

Controller
Code:
function index()
    {
        $data['page_title'] = "Join Tables";
        $data['description'] = "Blog";
        $data['keywords'] = "Blog";
        
        
        

        $config['base_url'] ='http://localhost/blog/';
        $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();
        
         //load the model and get results

        $data['blogposts'] = $this->MBlog->getAllPosts($config['per_page'],$this->uri->segment(3));
        
        $data['main'] = 'blog';
        $this->load->vars($data);
        $this->load->view('template');
    }

View
Code:
&lt;?php
foreach ($blogposts as $post){
    echo "<h4>".$post['post_title']."</h4>";
    echo "<p>".date('d M Y', strtotime($post['post_date'])) ."</p>";
    echo "<p>".$post['post_intro']."</p>";
    
    echo anchor('welcome/post/'.$post['id'],'Read More');

}
?&gt;
&lt;?php echo $paging_links; ?&gt;


Messages In This Thread
Pagination 404 - by El Forum - 03-22-2009, 05:54 AM
Pagination 404 - by El Forum - 03-22-2009, 06:04 AM
Pagination 404 - by El Forum - 03-22-2009, 06:30 AM
Pagination 404 - by El Forum - 03-22-2009, 07:00 AM
Pagination 404 - by El Forum - 03-22-2009, 10:47 AM
Pagination 404 - by El Forum - 03-22-2009, 10:54 AM
Pagination 404 - by El Forum - 03-22-2009, 11:25 AM
Pagination 404 - by El Forum - 03-26-2009, 05:28 AM



Theme © iAndrew 2016 - Forum software by © MyBB