On Jun 14, 2006, at 5:25 AM, Vladimir Zlatanov wrote:
«roundabout» It is. The theme layer is, very much like a theme- spaghetti. The longest theme trace in general Drupal is: Page » node » engine » core » engine » comment » engine » details » username » link Inbetween we move two times out of "views" mode and let the theme engine call core, call teh theme engine. And so on.
The path is true and that can be avoided but might not be very wise. It will add a lot of constraints on what is themeable and what not, unless we overhaul not only the the theme layer but the way drupal works.
The recent attempts to redo the theme system Adrian, Karoly, Dries and me are doing come from a few observations.
- From a designer's perspective it is not easy to find out what is
themeable. And when they find it there is a high chance that is php code. Ooops. Hard to read and grasp if you are not a coder.
- Different theme pieces are scattered around the codebase. Again,
hard to find.
So we are undertaking two things, split all modules into their own directories. Take out all theme functions into their own files living either in the appropriate module directory or in a new templates directory. Some of the phpteplate's internals now live in theme.inc We are trying not to make this stuff slower or more memory hungry.
This will hopefully help to find themeable components. Those which make sence should be migrated to mainly html with some php as opposed to the current state.
Creating a new theme from scratch can even be done like copy all tpl.php files into a directory. Change all files to suit you. Presto completely new look drupal.
The complicated threading of theme-code-theme-code-... is still there, but far more unnoticeable. Potentialy that is. In the end it does reflect the application flow.
Sounds like a thoughtful approach. But also sounds like more a re- engineering than an attempt to meet the need of these designers trying to design with Drupal for the first time.
Can you elaborate on "help to find themeable components. Those which make sense should be migrated to mainly html"?
-I want to understand more clearly the benefits to new designers trying to understand Drupal theming
Kieran
themes mailing list themes@drupal.org http://lists.drupal.org/mailman/listinfo/themes