Uwe C. Schroeder schrieb:
> 
> Hi everyone,
> here's a question I couldn't find an answer to and I hope maybe someone here 
> can help:
> I have a controller that returns a paginated set (think a forum topic with 
> all 
> the posts). I would like to immediately jump to the last page.
> 
> Basically it works like this: I have a page that lists all topics and 
> provides 
> a link to the topic without any tg_paginate_xxx variables - which results in 
> displaying the first page of the individual topic.
> Sine I don't think it's possible to provide a link to the last page of the 
> topic without actually querying the database on how many posts there are, I 
> thought I could influence the result in the controller method directly. So to 
> say a controller method that always jumps to the last page of the resultset.

Why don't you render the link with the page-parameter (I currently don't 
know how it's actually called) at the correct offset? That's like e.g. 
phpBB does it as well.

Of cours you'd need to query for the overall number of posts, yes.

Modifying the result won't work, as that would mean that paginate thinks 
the result is smaller & thus presents not the proper page navigation.

Diez

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"TurboGears" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/turbogears?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to