我有自定义drupal模块。我收到了我需要分页的网络服务的结果。 这就是我正在做的事情
$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), $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);
分页无效。任何想法,请帮助
答案 0 :(得分:0)
你在theme_pager中缺少一个参数:
theme_pager($tags = array(), $limit = 10, $element = 0, $parameters = array(), $quantity = 9)
尝试:
$output .= theme('pager', NULL, 1);