Just to be sure - is template.php the right place to create custom (new) functions (example utf->ascii conversion) that would be used in theme? Or the template.php is intended to be used only for overriding native functions?

Comments

thomjjames’s picture

Hi,

yes you can add any theme related functions to your template.php. but make sure that none of your modules are reliant on the functions you add to your template.php file or it may break your site if you change the theme later on.

if you find that you need to use the functions you add to the template.php outside of your theme (ie. in modules) then it'll probably be worth making them into a utility module.

thats my two cents.

cheers
Tom
______________________________________________
http://adrenalinehub.com
http://teachyourselfdrupal.com
http://codelessons.com

______________________________________________
https://tomswebstuff.com

auroqn’s picture

i'll bear in mind that in my adventure with drupal developement :)

thank you

auro