[development] theme_foo() functions vs tpl.php templates (was Move all core modules into their own directories)

Neil Drumm drumm at delocalizedham.com
Thu May 4 19:05:32 UTC 2006


Jeremy Epstein wrote:
> On 5/4/06, Robert Douglass <r.douglass at onlinehome.de> wrote:
> 
>> Neil Drumm wrote:
>> > I would actually be okay with removing the whole engine system and
>> > simply doing PHPTemplate only. Sure theme engines are a nice feature,
>> > but how many are maintained and what % of themes are PHPTemplate?
>>
>> I don't use anything but PHPTemplate, but I think that we want to keep
>> the engine system. Why don't we just leave the theme_ function inclusion
>> mechanism to the engine? PHPTemplate will require separate files, and
>> other engines can do what they please.
> 
> 
> I too am a big fan of PHPTemplate, and I don't even consider using a
> different engine when I design themes nowadays. But I think that the
> flexible theme engine system is a huge strength in Drupal, and that
> removing it would be a Very Bad Idea (tm). The plain PHP theming
> system is probably not worth using, for most people, but I think that
> it should remain to please the puritans among us (and besides, its
> overhead is minimal compared to the engines).

I'm one of those puritans using a PHP theme (delocalized.theme, it is 
even in contrib, but no project page for it).

I'm using a PHP theme because there are some ways PHPTemplate simply 
doesn't work:

- I want to decide my block regions, not have PHPTemplate tell me which 
ones I implement. (Or better yet, I just want to put regions in my 
template and have something else figure out what they are.)
- I want to decide my theme features, not have PHPTemplate tell me which 
ones I implement. (Or, better yet, I just don't want to have to worry 
about them.)
- I can just copy themeable functions into my theme and go.

But all these (especially the last) will have to be fixed if PHPTemplate 
is the default.

As for multiple themeing systems being a strength, I would really like 
to see hard statistics showing just how often PHPTemplate is used. If it 
is really high, I'd take the ability to do things that would otherwise 
break the engine layer and have the simplification of not having an 
engine layer over a check mark on the feature list.

-- 
Neil Drumm
http://delocalizedham.com/


More information about the development mailing list