Welcome Guest, Not a member yet? Register   Sign In
Pagination Issues
#1

[eluser]happydude[/eluser]
I have been trying to solve a pagination issue for a long time now to no avail.

Here is a sample URL: http://furogiftshop.com/categories/cookware/1

The pagination links are located just above the products. When you click on any other page number, the first page number (1) is always set as the current page number.

Any help will be appreciated.

My controller code: http://pastebin.com/gqzYFMRz
My view code: http://pastebin.com/iQFgJ9Fy
#2

[eluser]adamfairholm[/eluser]
Have you tried setting manually setting the uri_segment config item? The user guide says it automatically detects the URI you are going for, but from what I can tell from the code it just sets it at 3 and calls it a day (at least in CI2.0, unless I'm missing something).
#3

[eluser]InsiteFX[/eluser]
Look here there are 4 parts to this!

Web Lee Pagination tutorial

InsiteFX
#4

[eluser]happydude[/eluser]
@adamfairholm

I have tried manually setting the uri_segment config item... and I've still got the same problem.

@InsiteFX

I've been through that tutorial. Nothing that I don't know.

This problem beats my imagination.
#5

[eluser]Leftfield[/eluser]
Im also have a problem, somebody can help me?
Controller:

Code:
function index() {

        $CI = &get;_instance();
        $title = $CI->config->item('site_title');
        $data['title'] = $title;
        $data['date'] = date('Y:m:d');
        $data['copyright'] = $CI->config->item('copyright');
        $data['description'] = $CI->config->item('description');
        $data['keywords'] = $CI->config->item('keywords');
        $data['pages'] = $this->Content->get_pages();
        $data['rubrics_pages'] = $this->Content->get_rubrics_pages();
        $data['links'] = $this->Content->get_links();
        $data['count_comments'] = $this->Utility->count_comments();
        /*
         * Pagination
        */

        $this->load->library('pagination');

        $config['base_url'] = $this->config->item('base_url').'blog';
        $config['total_rows'] = $this->Utility->count_rubricspages();
        $config['per_page'] = '2';
        $this->pagination->initialize($config);

        $data['pagination']= $this->pagination->create_links();


        /*
         * End Pagination
        */
        $this->load->view('default/home', $data);
    }
View:
Code:
<?= $pagination ?>

on Main page of my blog i got
Quote:1 2 3 > Last ›

Model:
Code:
function get_rubrics_pages() {
        $this->db->order_by('id', 'DESC');
        $this->db->limit('5');
        $query = $this->db->get('pages');
        return $query->result_array();
    }
But Links like :
http://codelitecms.co.cc/blog/2
Quote:404 Page Not Found

The page you requested was not found.
#6

[eluser]Leftfield[/eluser]
[quote author="InsiteFX" date="1277114047"]Look here there are 4 parts to this!

Web Lee Pagination tutorial

InsiteFX[/quote]

that is !




Theme © iAndrew 2016 - Forum software by © MyBB