API page: http://api.drupal.org/api/drupal/includes--theme.inc/function/theme_table/7
Describe the problem you have found:
The examples for $rows[]
and cells state that you can add any html attributes - and especially class attributes.
- Any HTML attributes, such as "class", to apply to the table row.
It should be noted that you should use an array for html "class" attributes, because if you don't you will break the default tablesorters.
The docs should read something like:
- Any HTML attributes, such as "id", to apply to the table row. To add a "class" attribute you should add an array as follows:
'class' => array('extraclassname')
.
(the attached file has a non working and a working scenario)
Comment | File | Size | Author |
---|---|---|---|
tablesorter-issue-example.txt | 1.71 KB | jadwigo |
Comments
Comment #1
jhodgdonGood idea... This is a common attribute to add... We should probably create and then point to some standard documentation on how to add attributes to various HTML things.
Comment #2
jhodgdonThis is actually the same issue as #1135020: Need standard way to document the format of attributes in theme functions, so I am marking this as a duplicate.