pagination - How to add attribute class in theme('pager') in drupal 7? -



pagination - How to add attribute class in theme('pager') in drupal 7? -

how add together attribute class in theme('pager') in drupal 7 ?

my code following:

$directory_table .= theme('pager', array('quantity', $staff_count ),array( 'element' => array( 'class' => array('pagination pull-right'))));

but not applying class pager.

as theme_pager function expects 1 parameter (an array of variables), theme function phone call should this:

$directory_table .= theme('pager', array('quantity' => $staff_count, 'element' => array('class' => array('pagination pull-right'))));

but: seems theme_pager sets 'pager' class ignoring variables may send function.

so, best bet override theme_pager function. copying themes template.php file , renaming function mytheme_pager. can add together classes need in function, or add together logic need add together classes depending on variable sent function.

remember clear theme cache after overriding function.

drupal pagination

Comments

Popular posts from this blog

c - Compilation of a code: unkown type name string -

java - Bypassing "final local variable defined in an enclosing type" -

json - Hibernate and Jackson (java.lang.IllegalStateException: Cannot call sendError() after the response has been committed) -