I’m looking to “featurize” one of my content types using the Features module (http://drupal.org/project/features). The content type’s node template relies on a custom function I placed in my theme’s template.php file. Where should I move that function to so that I can package it up for the feature?
Share
Your feature package should consist of an include file with the features code, and a main .module file (Drupal requires at least an empty .module file for any module).
Any custom code you’ve got for your feature should go in there; as long as your module is enabled that file will be included on every normal page build. If you’ve got a lot a code obviously you can farm that out to include files, but they should be required/included in the .module file itself.