On Friday 09 November 2007, Jeff Eaton wrote:
I agree that theme_table() is an ugly beast to override. However, I'm not sure what the alternative is. "using less of it" means either using less tables, or having several million tpl.php files lying around core whose only purpose is to wrap strings in <td> tags. All of these tpl.php's must be upgraded whenever one wants to change the classes or other 'wrapper' data for tables on a sitewide basis. Am I misunderstanding what you mean when you say we should move away from it?
I agree that we're adding flexibility "at the expense of themers." However, I think that's a necessary evil in many places. Any sufficiently complex structure *requires PHP code to render*, rather than simple print() statements. My feeling is that it's a fact of life, and the only way to change that is to make the functions in question essentially unthemable -- collapsing them to such "dumbed down" pre-rendered strings that we've just duplicated the old $node-
body problem again.
--Jeff
OK, I really have to ask... am I the only one who actually likes theme_table()? ;-) -- Larry Garfield AIM: LOLG42 larry@garfieldtech.com ICQ: 6817012 "If nature has made any one thing less susceptible than all others of exclusive property, it is the action of the thinking power called an idea, which an individual may exclusively possess as long as he keeps it to himself; but the moment it is divulged, it forces itself into the possession of every one, and the receiver cannot dispossess himself of it." -- Thomas Jefferson