Welcome Guest, Not a member yet? Register   Sign In
paginations links
#5

[eluser]Merolen[/eluser]
Both num_links and per_page has a default value if you don't specify it, so can't understand why that should have anything to do with it.
Code:
$config[’num_links’] = 2;
$config[’per_page’] = 10

This is my pagination helperfuntion which works fine

Code:
function pagination($url, $numRows) {
    $CI =& get_instance();
    
    $CI->load->library('pagination');
    
    $config['base_url'] = site_url().'/'.$url;
    $config['total_rows'] = $numRows;
    $config['per_page'] = 15;
    $config['first_link'] = '';
    $config['last_link'] = '';
    $config['num_links'] = 5;
    $CI->pagination->initialize($config);
    $pagStr = $CI->pagination->create_links();
    
    return $pagStr;
}


Messages In This Thread
paginations links - by El Forum - 03-27-2008, 05:13 AM
paginations links - by El Forum - 03-27-2008, 06:37 AM
paginations links - by El Forum - 03-27-2008, 07:03 AM
paginations links - by El Forum - 03-27-2008, 07:15 AM
paginations links - by El Forum - 03-27-2008, 07:25 AM



Theme © iAndrew 2016 - Forum software by © MyBB