By Rakward on
Does somebody already have an easy way expanding Drupal's theme_table function to give each table an id or class so I can do some theming with css?
Adding classes like "col1" and "col2" would also be pretty usefull ...
Does somebody already have an easy way expanding Drupal's theme_table function to give each table an id or class so I can do some theming with css?
Adding classes like "col1" and "col2" would also be pretty usefull ...
Comments
Not sure about the
Not sure about the theme_table function, but if you're using views to build your tables you can add css classes easily enough.
Not talking about themes,
Not talking about themes, just drupal generated tables with the functions in theme.inc.
theme_table allows table, row and cell attributes
I know this thread is a year old, but since I went looking for the same answer and didn't find it here, I went into the source in includes/theme.inc. The answer is in the comments for the theme_table function (which I imagine you found by now, but I put here for others to find):
So, this should give you the col1, col2, etc attributes you are looking for (plus I also gave each row a distinct class):
The code above produces this HTML: