Introduction to Drupal features

2,513
-1

Published on

An introduction to features and how to keep your site configuration in code helping you and your team during development and making maintaining a site a breeze

Published in: Technology
0 Comments
0 Likes
Statistics
Notes
  • Be the first to comment

  • Be the first to like this

No Downloads
Views
Total Views
2,513
On Slideshare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
0
Comments
0
Likes
0
Embeds 0
No embeds

No notes for slide

Introduction to Drupal features

  1. 1. Using features/ exportables in production @drupalvolcon Antwerp April 20, 2010 Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  2. 2. Stijn De Meyere freelance drupal dev as villaviscom.be working closely with nascom.be @stijndm sken.be Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  3. 3. The problem Development local/online Staging Production Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  4. 4. The problem Different databases No version control Did we do that? Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  5. 5. Solution As much settings as possible in code Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  6. 6. Features drupal.org/project/features Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  7. 7. Features Allows you to export settings that live in the database to code A feature is a module, but more Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  8. 8. Features: exportables Strongarm (variables) Permissions Context Imagecache Views Content (node + cck) Set dependencies Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  9. 9. Features extra drupal.org/project/features_extra Taxonomy (vocabularies) Nodequeue Blocks Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  10. 10. Fun and easy Easy creation Easy additions Diff (drupal.org/project/diff) Easy maintenance with Drush (drush features- update [feature-name] (drupal.org/project/ drush) Acts as a module (because it is a module) Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  11. 11. Fun and easy Except the first export Oh, and don’t forget ... What to do whith stuff already in code? Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  12. 12. When is a module a feature When the .info file has one of these: features[context][] = features[variable][] = features[user][] = features[node][] = features[views][] = Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  13. 13. Why is this important Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  14. 14. Why is this important All (most of) our settings are in code Source control Easy deployment (upload, revert) Operate and support Getting rid of thix (and minimizing template.php) Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  15. 15. Other stuff Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  16. 16. Display Suite Has features support, but not for individual objects Individual display and fields export (settings are in variables) Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  17. 17. Formatters Custom CCK formatters, hand coded or with the help of drupal.org/project/ custom_formatters Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  18. 18. Feature server fserver Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  19. 19. Fserver code.developmentseed.org/featureserver/ node/163 Make you site act as a module/feature server Update notifications Automated release in combination with Project module (drupal.org/project/project) Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  20. 20. Fserver examples fserver.nascom.be/ fserver.pronovix.net/ Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  21. 21. Jump-starting a project Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  22. 22. Jump-starting a project Define default modules Define default features Standardising workflow Drush + Drush Make Stijn De Meyere @stijndm www.sken.be VILLAVISCOM
  23. 23. Questions? Stijn De Meyere @stijndm www.sken.be VILLAVISCOM

×