introduction to the features module

13
Introduction to the Features module João Ventura (jcnventura) [email protected]

Upload: joao-ventura

Post on 07-Jul-2015

596 views

Category:

Technology


1 download

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

Page 1: Introduction to the features module

Introduction to the Features module

João Ventura (jcnventura)

[email protected]

Page 2: Introduction to the features module

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)

Page 3: Introduction to the features module

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)

Page 4: Introduction to the features module

Content types / CCK

Managing a content type:

DB-only

Content copy module

hook_node_info()

or...

Features module

Page 5: Introduction to the 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.”

Page 6: Introduction to the features module

Features puts configuration into code

Page 7: Introduction to the features module

Exportables support in Features

Content types

CCK fields / fieldgroups

Views

Imagecache

Input filters

Users roles / permissions

CTools export API

Panels

Page 8: Introduction to the features module
Page 9: Introduction to the features module
Page 10: Introduction to the features module
Page 11: Introduction to the features module
Page 12: Introduction to the features module

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

Page 13: Introduction to the features module

Questions