views:

148

answers:

1

Hi all,

Does anyone here know how to set up a pager_query() to automatically go to the last page of the query when the page is displayed? I'm using theme_pager() to format the page.

+1  A: 

drupal_goto: http://site.com/views_page_link?page=LastPageNum
determine LastPageNum via quering count of result divided counts of elements to show.

Nikit
Thanks. Not exactly what I was looking for, but it did actually answer my question as asked. I was just hoping to be able to do this without specifying a URL like that, as I'm using this in a module where the URL is coming through the hook_menu, which alters the ? and = characters.
Michael D
it's very simple: in menu create this: http://site.com/views_page_link/last. Then in menu header add php code, that will see "last"==arg(1) and drupal_goto to last num as i show.
Nikit
Ah, I think I understand. I'll work on this when I get a chance and reply when I get it to work. Thanks!
Michael D