I wrote few helper functions and now I want to add these functions somewhere, so that I can call them from any template files.
Where should I put them?
Drupal Answers is a question and answer site for Drupal developers and administrators. It only takes a minute to sign up.Sign up to join this community
Helper functions is a bit vague for a description (so there may be better places where to put this, like a custom module), but theme functions are usually put into the
template.php file of your theme.
It is not generally adviced to put much php code into your templates however (save for printing variables) - best practice usually calls for the use of alter hooks or other preprocess functions. Get a (small) overview here: template.php