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

[eluser]0plus1[/eluser]
I'm having trouble understanding how to use the paginate library correctly. If I copy the code found in scaffolding it works perfectly, as soon as I change something I keep getting this error:

Code:
404 Page Not Found

The page you requested was not found.

As soon as I try to switch page.

What could be the problem?
#2

[eluser]0plus1[/eluser]
Update:

this wont' work:

Code:
http://my.site.com/ci/index.php/ana/20

This will work:

Code:
http://my.site.com/ci/index.php/ana/ana/20
:ohh:
#3

[eluser]Dam1an[/eluser]
The first URL you posted shouldn't work, unless you've changed the config for the pagination library or set up some routes, as the pagination variable should be the 3rd segment, and it's the 2nd in your first URL
#4

[eluser]0plus1[/eluser]
There is something I'm missing.. sorry if these are stupid questions but I would love to understand..

'uri_segment' => x

This should set the uri segment, but whomever value I give it it wont build different url.. also if I click on a page (like page number two) it adds another ana/

first page pagination links: index.php/ana/ana/x

as soon as i click on a page number becomes:

index.php/ana/ana/ana/x

How come?
#5

[eluser]Dam1an[/eluser]
The uri_segment variable is where it looks for the offset to use, it has nothing to do with building the URI
The URI is built with the base_url variable, what do you have this set to?
#6

[eluser]0plus1[/eluser]
$config['base_url'] = "http://traxx.site.com/traxx/";

This is the very root where CI reside. (index.php of CI is http://traxx.site.com/traxx/index.php) (my app is http://traxx.site.com/traxx/system/application)




Theme © iAndrew 2016 - Forum software by © MyBB