When creating tables using the theme_table function, the default method to turn off table striping is to add the no_striping option row by row:
$rows[] = array('data' => array(...), 'no_striping' => TRUE);
When using Bootstrap, however, the table-striped class is always added to the table. I would like to propose that users add the no_striping class to a table when striping is not desired (since it usually is, I think making striping by default is good):
theme('table', array('header' => $header, 'rows' => $rows, 'attributes' => array('class' => 'no_striping')));
Please see attached patch, where bootstrap_preprocess_table is modified to look for this class before adding the table-striped class.
| Comment | File | Size | Author |
|---|---|---|---|
| #1 | Add_option_to_turn_table-striped_class_off-1911218-1.patch | 460 bytes | MD3 |
Comments
Comment #1
MD3 commentedPatch.
Comment #2
wundo commentedCommited! :)
But I'm using the following class to toggle no stripping: table-no-striping
Comment #3
MD3 commentedAwesome! Thanks so much!
Comment #5
sobi3ch commentedThere is now other class to do it
table-no-striping. So just theme table like this: