Introduction to the features module
-
Upload
joao-ventura -
Category
Technology
-
view
595 -
download
1
description
Transcript of Introduction to the features module
![Page 2: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/2.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/3.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/4.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/5.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/6.jpg)
Features puts configuration into code
![Page 7: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/7.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/8.jpg)
![Page 9: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/9.jpg)
![Page 10: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/10.jpg)
![Page 11: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/11.jpg)
![Page 12: Introduction to the features module](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/12.jpg)
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](https://reader035.fdocuments.in/reader035/viewer/2022080212/559b33961a28ab39638b4629/html5/thumbnails/13.jpg)
Questions