1

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.

sepehr
  • 17,110
  • 7
  • 81
  • 119
Michael D
  • 621
  • 1
  • 7
  • 23

1 Answers1

1

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

Nikit
  • 5,128
  • 19
  • 31
  • 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 Apr 30 '10 at 15:11
  • 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 Apr 30 '10 at 23:53
  • 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 May 01 '10 at 01:59