Dries Buytaert wrote:
Improving the theme functionality in Drupal 6 is going to draw a lot more designers to Drupal than a (temporary) themer pack, IMO. Plus, it avoids duplication of work and causes fewer upgrade pains. Hence, I plan to be working on separating out theme functions into .tpl.php files for Drupal 6. People that are willing to help, including you and/or Ber, are more than welcome to.
I've done a bit of thinking about this. The first step I see is moving the variable setting from PHPTemplate to the core theme system. The key thing to realize here is that what is called from a module is not what a themeable function or template wants to receive. Node module likes calling theme('node') with a small number of arguments, but node.tpl.php has a much larger set of variables. The way I see this being implemented is adding a preprocessor step to theme(). If theme_foo_preprocess() exists, then that would be called with the original arguments and returns a larger set of, probably named, arguments. That function would be called in a themeable manner, so my_theme_foo_preprocess() could replace that argument preparation. This would move a large chunk of code out of PHPTemplate into the core theme system where it belongs. -- Neil Drumm http://delocalizedham.com/