php - Theme function in Drupal 6 -
im using drupal 6.x. in page have following code prints paged table.
$headers = array(array('data' => t('node id'),'field' => 'nid','sort'=>'asc' ), array('data' => t('title'),'field' => 'title'), ); print theme('pager_table','select nid,title {node_revisions}', 5, $headers );
is there way can pass rows of table array theme function ?
i don't know theme_pager_table
, it's not part of drupal core. can do, wrap sql in pager_query()
, can loop through results , create table rows normal. pager_query()
handle adding limit
, offset
in query.
doing cam use normal theme_table
, add pager theme_pager
. (remember use theme
, wrapper function instead of calling theme functions directly)
Comments
Post a Comment