Paging Results - Drupal Module
I have custom drupal module. I receive result from a webservice that I need to page. Here is what I am doing
$result = webservice_call_results(); $attributes = array( 'border' => 1, 'cellspacing' => 0, 'cellpadding' => 5, 'width' => 600, ); $rows = array(); foreach ($result->headers->RPMHeader as $data) { $rows[] = array( l(t($data->reg_no), round($data->total_payment,2), 开发者_Python百科 $data->prepared_by ); } $headers = array(t(' Reg Number'), t('Total Payment'),t('Prepared By')); $output =theme('table',$headers,$rows,$attributes); $output .= theme('pager', 1); // Not Working -- Paging $form['manufacturer_search']['table'] = array( '#type' => 'markup', '#value' => $output);
The paging is not working. Any Idea why, please help
You're missing an argument in theme_pager:
theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9)
Try:
$output .= theme('pager', NULL, 1);
精彩评论