Welcome Guest, Not a member yet? Register   Sign In
another pagination problem
#1

[eluser]gwood[/eluser]
I am implementing pagination a record set off a custom db query. For this I am passing a value by using URI segment to the query based on which the records are returned. Now, the first page of the result appears correctly. But then when I click pg2, it shows error as it now longer takes the correct URI segment as argument. That segment now actually turns to the page number and it takes it as an argument and so no record are returned. Well, if I messing it up for you, here's it in simple term...

Code:
http://localhost/cit/index.php/books/tags/fiction/

I use this URI (books controller, tags function, and fiction is the param) to find books in db table that are tagged as fiction. Now if I use
Code:
http://localhost/cit/index.php/books/tags/
as the base URI for pagination, the pagination link turns like
Code:
http://localhost/cit/index.php/books/tags/10
. Note that 10 here is not the param for tag but the offset for page 2 of the paged record set. And hence it returns empty row. I tried using a session variable but then it looks like the new URI segment overwrites the session variable too!

How do I work around this??? Also, is there any way I can make the pagination link appear as say,
Code:
http://localhost/cit/index.php/books/tags/fiction/10
that is baseURI then, param and then pagination offset.
Thank you!


Messages In This Thread
another pagination problem - by El Forum - 04-12-2010, 05:21 PM
another pagination problem - by El Forum - 04-12-2010, 06:12 PM
another pagination problem - by El Forum - 04-12-2010, 09:17 PM



Theme © iAndrew 2016 - Forum software by © MyBB