w8mzda
Last Updated: February 25, 2016
·
1.343K
· balintgaspar

customizable pagination Parameters pyrocms

in system/cms/helpers/pagination_helper.php
change the function parameters from:

function create_pagination($uri, $total_rows, $limit = NULL, $uri_segment = 4, $full_tag_wrap = TRUE)

to:

function create_pagination($uri, $total_rows, $limit = NULL, $uri_segment = 4, $full_tag_wrap = TRUE,$cf=NULL)

After the pagination $config declarations put this:

foreach($config as $ckey => $cval):;
        if(isset($cf[$ckey]))
        {
            $config[$ckey] = $cf[$ckey];
        }
endforeach;

if you create a pagination in your controller with create_pagination() function you can define an array as 6th parameter of the function to configure all the parameters of pagination class.

like this:

$cf = array(
        'next_link' => "<span>next</span>",
        'prev_link' => "<span>prev</span>",
        'num_links' => 7,
        'last_link' => "last",
        'first_link'=>"first"
    );

Happy coding:)!!