I'm working on a module that uses soap to fetch data from a webservices. Data are ok, and I'll use theme functions to display them as a list. I should also to split results in pages, like views. Is there a way to add a pager?
1 Answer
Use something like
foreach ($result as $node)
{
$rows[] = array('data' => array("". $node ."..."));
$html = theme('table',array('header' => $header,'rows'=>$rows,'caption' => '','sticky' => FALSE,'empty' => 'No details found...','attributes'=>array('class'=>'table-class'),));
$html.= theme('pager',array('tags' => array(),'quantity'=> 10));
}
-
I try it, but the pager is not created, I've only html from the table– arrubiuCommented Jul 9, 2012 at 9:14
-