Drupal 7 Tutorial: Features Module

4,407 views
4,077 views

Published on

Published in: Technology

Drupal 7 Tutorial: Features Module

  1. 1. FEATURES MODULE Drupal 7 Webinar
  2. 2. Presented By
  3. 3. Prasad Shirgaonkar Curriculum Developer, 
 Acquia Learning Services" • Designs and conducts Training programs on Drupal and Acquia Products! • Over 20 years of Industry experience, 7 years on Drupal! • In past, worked on 200+ Drupal projects @prasadshir
  4. 4. The Config Management Challenge How to copy or move 
 site configurations 
 between environments?
  5. 5. Drupal Development Workflow GIT$ DB$ CODE$ DB$ CODE$ DB$ CODE$
  6. 6. Drupal Site Components Code% •  Modules% •  Themes% Config% ura3ons% •  Content%Types% •  Views% Content% •  Nodes% •  Terms%
  7. 7. Drupal Site Components Code Files Database Database Code% •  Modules% •  Themes% Config% ura3ons% •  Content%Types% •  Views% Content% •  Nodes% •  Terms%
  8. 8. Initial Development DB# CODE# GIT# DB# CODE# DB# CODE# DB# CODE# In#Sync!#
  9. 9. Continuous Workflow DB# CODE# DB# CODE# Changed#
  10. 10. How do we manage 
 site configurations?
  11. 11. Features There’s a module for that!
  12. 12. drupal.org/project/features
  13. 13. Features Module • Enables the capture and management of features in Drupal. ! • A feature is a collection of Drupal entities which taken together satisfy a certain use-case.! • Converts and stores site configurations in code rather than in DB!
  14. 14. Features Applications • Move your site configurations from database to code making them easier to • Move between environments • Check-in in a version control system • Distribute independently as ‘features’ and re-use across different sites
  15. 15. Demo
  16. 16. More Discussion Understanding intricacies and extending Features
  17. 17. Features Terminology • Revert • Changes your site configuration in DB to match up with the definitions in the feature module code. • Code —> DB ! • Update • Produces a modified version of your feature module code, which matches up with the configuration found in the DB. • DB —> Code
  18. 18. What can be ‘feature’ized • Core • Content Types • Vocabularies • User Roles • Permissions • Fields • Text Formats • Menus • Image Styles
 • Contrib • Views • Panels • Rules • Contexts • Display Suite
  19. 19. What cannot be ‘feature’ized • Content • Nodes • Terms • Users • Custom Blocks
  20. 20. Advanced Usage • Strongarm Module • Use for exporting Variables like site name, slogan etc • Diff Module • For comparing difference between code and DB • Drush Integration • features-list (fl), features-components (fc), features-diff (fd) • features-export (fe), features-revert (fr), features- update (fu)
  21. 21. Resources • Features Module on D.O.
 https://drupal.org/project/features • Features Module Documentation
 https://drupal.org/documentation/modules/ features • Strongarm Module
 https://drupal.org/project/strongarm • Diff Module
 https://drupal.org/project/diff

  22. 22. Q + A Your questions please!

×