[development] someone make a theme out of these templates

Adrian Rossouw adrian at bryght.com
Wed Mar 8 15:17:30 UTC 2006


On 08 Mar 2006, at 4:39 PM, Khalid B wrote:

>
> At one point there was a proposal to document what ids/classes Drupal
> uses. This would have helped standardize this area, but the problem
> would not have gone away completely.
What I would like to see us do, is remove all html from module files  
and move them
into tpl.php files.

while we are doing this, we completely refactor all the html, and  
make sure all the tags
we generate are  there because we need them.

Additionally once this is done , you can override any theme function  
by just copying the file
to your theme directory, no fucking around with template.php.

It becomes a LOT simpler to write a theme editor, as you can just  
load the contents of these
files into a text area and have the user edit that and cache it into  
the db.

it loads a lot less code, as you will never load any html without it  
being needed. file_exists
is also incredibly fast, as it caches in both php and the filesystem,  
but if that's not fast enough
we can still cache in drupal to make sure it only does a check on the  
first request.

it becomes possible to distribute alternative template files, like  
different node views etc.

and that, is very honestly just the tip of the iceberg of benefits  
that moving to template files
for theme functions provide.

the first step is getting all modules in their own directory though.


--
Adrian Rossouw
Drupal developer and Bryght Guy
http://drupal.org | http://bryght.com




More information about the development mailing list