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

[eluser]Parlays[/eluser]
Hello everybody!

I am using the pagination class. The problem is that if in the config file $config['enable_query_strings'] is set to TRUE, the pagination links automatically set the URL to use querystrings and display as '&per_page=x'

The problem is that if the config setting is true, there is no way to get it to display the pagination with URI segments. I think this is a bug.

Even if you in the pagination config, the $config['page_query_string'] = FALSE, it still uses query strings. The only way to make the pagination display as a URI segment is to change that config setting in the config file and not allow querystrings sitewide.

Please help.
#2

[eluser]umefarooq[/eluser]
put your code how you are using the pagination and why you want to use URI segment.
#3

[eluser]Parlays[/eluser]
The code is pretty straight forward, i can post it if you really need to see it, but the question is pretty clear.

The reason i want to use URI segments is that I don't want to convert everything into querystrings like the controller and method. I use URI segments right now and want pagination to use URI.

I believe this is a bug in the upgrade to 1.7 because it seemed to not do this before the upgrade.
#4

[eluser]Parlays[/eluser]
The problem is in the pagination class.

if ($CI->config->item('enable_query_strings') === TRUE OR $this->page_query_string === TRUE)

{

$this->base_url = rtrim($this->base_url).'&'.$this->query_string_segment.'=';

}

else

{

$this->base_url = rtrim($this->base_url, '/') .'/';

}

It should say "AND" instead of "OR". This is poorly done. Is there a way I can change this line without changing this original file. Can I use hooks?
#5

[eluser]Colin Williams[/eluser]
Hrm. I think && might make sense in this case. You should submit a bug report, and maybe contact a team member directly
#6

[eluser]Parlays[/eluser]
Thanks for the response. I'll submit a bug for that. Thanks!!
#7

[eluser]Nonox[/eluser]
Hi.
Searching in the bugs tracker I found this:

http://codeigniter.com/bug_tracker/bug/9588/

I hope this will solve soon.

Nonox




Theme © iAndrew 2016 - Forum software by © MyBB