Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Introduction to the features module

Introduction to the features module

http://dublin2010.drupalcampireland.org/sessions/introduction-features-module

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.

João Ventura

December 09, 2010
Tweet

More Decks by João Ventura

Other Decks in Programming

Transcript

  1. 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 database – Changes to configuration (important) – Lorem Ipsum content (irrelevant)
  2. 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)
  3. Content types / CCK • Managing a content type: •

    DB-only • Content copy module • hook_node_info() or... • Features module
  4. 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.”
  5. Exportables support in Features • Content types • CCK fields

    / fieldgroups • Views • Imagecache • Input filters • Users roles / permissions • CTools export API • Panels • Open Layers
  6. 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