introduction to the features module
DESCRIPTION
When staging a site from development to production, it is often necessary to export a lot of features that were created in the database. Developers often which it were as simple as updating the code from the latest version found in their cvs/svn/git repositories. Some modules enable you to export their settings to code, which can then be version controlled, but they aren't many and usually the process requires some cut and pasting which can lead to human error.The features module enables you to export some of the more popular Drupal database configurations into code, in a simple and user-friendly way.In this session I will introduce the features module, explain how it works, why it is useful and briefly demonstrate how to use it.TRANSCRIPT
Site resources
Moving a Drupal site usually requires the following three sets of resources:
Drupal code files usually managed under a VCS
Data files (i.e. sites/default/files/*)Usually not relevant when moving from development to
production, as it is full of placeholder images
Drupal databaseChanges to configuration (important)
Lorem Ipsum content (irrelevant)
The problem
The configuration changes created in the Drupal database are part of the development process.
Moving config should not move test content
Config should be handled in the same VCS that manages the code
It should be possible to propagate changes from development to production (specially for a live site)
Content types / CCK
Managing a content type:
DB-only
Content copy module
hook_node_info()
or...
Features module
What does Features do
”Features provides a UI and API for taking different site building components from modules with exportables and bundling them together in a single feature module. A feature module is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its .info file so that it can be checked, updated, or reverted programmatically.”
Features puts configuration into code
Exportables support in Features
Content types
CCK fields / fieldgroups
Views
Imagecache
Input filters
Users roles / permissions
CTools export API
Panels
Resources
Features module
http://drupal.org/project/features
Strongarm module (variables export)
http://drupal.org/project/strongarm
Features extra
http://drupal.org/project/features_extra
Thanks to Florian Lorétan of wunderkraut for some of the slides
Questions