Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
By John Carbone on
I've used the Features module to create a feature and I'm trying to add a tpl file to that feature but I can't get Drupal to recognize it. The feature is basically a cck content type and some imagecache settings. Normally I could add a tpl to the the site 's enabled theme folder and it would work fine, but I'm trying to create a bunch of features that can easily be used on any site with any theme. Anyone have any ideas?
Thanks!
Comments
Figured it out
Figures. After searching for hours, reading articles and general head scratching, I finally came across this http://hddigitalworks.com/theming-cck-content-type which includes a section called "theming from a module" about 10 minutes after posting this topic. In case anyone else ends up wondering the same thing, here's how I did it.
After creating my tpl and adding it to my module's folder, I opened my MYMODULE.module file and added the following:
After flushing the site's caches to rebuild the theme registry, my tpl.php was finally being called by the Feature. Sweet!
http://bonify.io