Last updated May 18, 2011. Created by clemens.tolboom on September 18, 2009.
Edited by johnbarclay, coltrane, Itangalo. Log in to edit this page.
Section to be written. Some information is found in API.txt (DRUPAL-6--1) in the Features folder.
Making your module support Exportables
The section "Integrating your module with the Features API" in the api above outlines the basics. The following article explains how to make the data stored in your db tables exportable:
http://drupal.org/node/928026
To make your variables exportable, without writing any code, you can use strongarm http://drupal.org/project/strongarm. The directions on the front page of strongarm under the heading "Updating your features from Strongarm 1.x to 2.x" cover this.
To see how other modules implement features and use strongarm, do a search for:
features[variable][]in .info files'export' =>in .install files.
A simple test module that supported features for the examples module would be a great place to start learning features
Comments
Tutorial article
I have written a tutorial article that touches upon this topic from the standpoint of someone unfamiliar with the Features module. Possibly useful if you ignore my philosophical remarks and nit-picking: Version control in Drupal 6 using the Features module.
Adding Features to support to your pre-existing module
If you just want to manage your pre-existing module, with its various views, panes, panels and content types through Features, rather than remembering to manually export each one everytime you need to deploy after a minor alteration, it won't work unless you insert
include_once('your_module_name.features.inc');as the first line of your .module file.
When you create a Feature with your pre-existing module name, it packages all the files in your module automatically, so nothing is lost, but that crucial line is not automatically added. I spent many, many hours trying to figure out why my modules didn't deploy properly when they appeared to work on my local machine...
what about info file?
If you are just moving that line to your existing module, does either info file (your module info or the features module info) need to be adjusted in any way? Seems like it would break something.
When will this get written?
Does anyone know when this article will be written? I'm fairly new to drupal and have built a few drupal modules, but wish to know more about how to integrate them with features. Are there any other articles out there in this topic?
Much appreciated.
Have you found any useful
Have you found any useful articles on this topic? Thanks.