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

[eluser]JHackamack[/eluser]
I've been playing around with pagination and noticed I have to type in the base_url every time for class to work, although I like it better with the anchor helpers anchor('','home') links to home.

On line 173 of pagination.php I've made the following changes

Code:
if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)
        {
            $this->base_url = base_url().rtrim($this->base_url).'&'.$this->query_string_segment.'=';
        }
        else
        {
            $this->base_url = base_url().rtrim($this->base_url, '/') .'/';
        }

That way when you call the baseurl config value for pagination you only need:
Code:
$config['base_url'] = 'index.php/home/assetSearch/page/';
instead of the whole server name (which helps when we port applications from one server to another. The pagination class should recognize the same url formatting as anchor and format accordingly, but why do we have to put in the whole url?




Theme © iAndrew 2016 - Forum software by © MyBB