[support] Using Drupal Pager in D5 Module

Fred Jones fredthejonester at gmail.com
Thu Aug 7 09:07:11 UTC 2008


I have a custom SQL search and I use pager_query which works nicely.
But how do I get the paging links to come up? I tried this:

		$form['pager'] = array(
			'#value' => theme('pager', NULL, 10, 0)
		);

which I see in other modules, but nothing happens. To clarify, this code:

		$form[] = array(
			'#value' => theme('table', array('Name'), my_module_run_search())
		);

generates the search results, and in my_module_run_search() I call pager_query.

I am also wondering how the page=1 from the URL gets transferred into
pager_query, because if I manually add it to the URL, I still get the
first page.

Thanks for any pointers!


More information about the support mailing list