us to export parts of a Drupal site’s configuration (which is typically stored in the database) into code. • Takes the site’s components and bundling it together into an exportable "feature” module. Wednesday, 28 November, 12
the Features module. • is like any other Drupal module except that it declares its components (e.g. views, contexts, CCK fields, etc.) in its `.info` file. Wednesday, 28 November, 12
other functionality, etc.) to its `*.module` as you would with any other module. • Features will keep your changes to *.module and any other files you add Wednesday, 28 November, 12
Taxonomies • Image styles • System variables (Strongarm) • User roles and permission • Views • Panels • Context • Any module can support exporting in Feature • etc.... Wednesday, 28 November, 12
between the default and overridden state of a feature. • features-export (fe) Export a feature from your site into a module. • features-list (fl) List all the available features for your site. • features-revert (fr) Revert a feature module on your site. • features-revert-all (fr-all, fra) Revert all enabled feature module on your site. • features-update (fu) Update a feature module on your site. • features-update-all (fu-all, fua) Update all feature modules on your site. Wednesday, 28 November, 12
$ drush fr demo_slideshow Do you really want to revert views_view? (y/n): y Reverted views_view. $ drush fu demo_slideshow Module appears to already exist in sites/demo/modules/features/demo_slideshow Do you really want to continue? (y/n): y Created module: demo_slideshow in sites/demo/modules/features/demo_slideshow Wednesday, 28 November, 12
etc) • Separates Site configuration from Site content. • Easily distribute configurations to customers and developing sites – and reuse existing ones. • Use it as starting point for your own module. • Integrates with Drush Why Features? Wednesday, 28 November, 12