Forum OpenACS Q&A: Response to template::paginator

Posted by Deds Castillo on
My boss pointed me to this thread when I asked if he has any generic pagination stuff. I can say that the acs-templating paginator-procs works pretty well for my needs. I have a couple of bug fixes and improvements though. I've already submitted a patch here

Here is a summary of the changes on this patch:

  • corrects incorrect return value in get_page_count
  • adds a get_pages_info proc which is the counterpart of get_context for non-contextual page objects
  • adds a get_row_last proc which gives the last row in a current page
  • improved parameter explanation on some procs
  • corrects a typo in init proc which messes up initialization of non-contextual page objects
  • modified get data so that it is not restricted on integer keys, thus allowing it to be used on queries which don't have primary keys by building your own unique keys

No difference in affected file on both HEAD and oacs-4-6 branches so the patch can be applied on both.