Paging Results - Drupal Module

Posted by Krishma on Stack Overflow See other posts from Stack Overflow or by Krishma
Published on 2010-05-12T16:11:26Z Indexed on 2010/05/12 16:14 UTC
Read the original article Hit count: 268

Filed under:

Hi

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),
      $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

© Stack Overflow or respective owner

Related posts about drupal