[development] Making blocks from some setting in Drupal 7?

Earl Miles merlin at logrus.com
Sun Feb 24 05:32:55 UTC 2008

Matthew Farina wrote:
> Putting function calls in the themes page.tpl.php file would be a step 
> backward for the theming system.

Again, I must disagree with this assertion.

We *must* allow calling the t() function in templates.

We generally allow calling the theme() function in templates. (Note that 
doing regions is currently done with theme('blocks', 'regionname');

This wouldn't be a step backward from our current setup; and the t() 
function itself poses a really special problem. It's difficult to put 
all text in preprocess functions, and if you put text in page.tpl.php 
then t() must be available for translation. Yes, this is a 
damned-if-you-do-damned-if-you-don't problem.

Smarty and PHPTal are both capable of allowing function calls. Any 
templating system we use simply needs to be able to allow at least those 
2 function calls

More information about the development mailing list