Welcome Guest, Not a member yet? Register   Sign In
codeigniter pagination strange problem!

hi all... my pagination link remain active on the first link regardless of which page i am. i dont know where the problem is coming from.. please review my code, i may just be missing something

controller code

public function view($region, $slug, $offset=0)
        $query = $this->question->get_question_by_slug($slug);
        $replies = $this->question->get_question_replies($query->id, $offset);
        $replies_total = $this->question->get_question_replies_total($query->id);

        // pagination links for replies
        $config['base_url'] = base_url().'/question/view/'. $region . '/' . $slug;
        $config['total_rows'] = $replies_total;
        $config['per_page'] = '10';
        $config['uri_segment'] = 4;
        $config['num_links'] = 2;
        $config['full_tag_open'] = '<p style="text-align:right">';
        $config['full_tag_close'] = '</p>';
        $config['num_tag_open'] = '<span class="page_num">';
        $config['num_tag_close'] = '</span>';
        $config['cur_tag_open'] = '<span class="page_num_cur">';
        $config['cur_tag_close'] = '</span>';
        $config['next_link'] = 'Next';
        $config['next_tag_open'] = '<span class="page_num">';
        $config['next_tag_close'] = '</span>';
        $data['pagination'] = $this->pagination->create_links();
        $data['views'] = $this->question->get_views($data['question']->id);
        $this->load->view('temp_header', $data);

I'm actually facing this same issue. Two posts since 2009 about this same problem have remained unanswered. Is it something obvious that is being missed here?

Sorry, I found the answer to my specific problem. It was setting the uri_segment wrong...

Theme © iAndrew 2016 - Forum software by © MyBB