Intro to Features Module on DrupalPresentation Transcript
Intro to Features english: fea· tures (NOUN) A) THE STRUCTURE, FORM, OR APPEARANCE ESPECIALLY OF A PERSON drupalese: fea· tures (module) a) A feature is a collection of Drupal entities which taken together satisfy a certain use-case. Presented by Aidan FosterFOSTER INTERACTIVE email@example.comWeb Development + Design Linked In: ca.linkedin.com/in/aidanfoster
What is “Features”? Slides & Links are posted:http://fosterinteractive.com/features-intro
A Drupal Module that saves yourChecky-Box-Stuff to the ﬁle system (as modules)
Checky Box Stuff ? CCK Field + Content Types
Checky Box Stuff ? VIEWS
Checky Box Stuff ? Permissions
Checky Box Stuff ? Add on Modules Extend this to include more Drupal “Elements”Features “Extras” module “Strongarm” module• Taxonomy Terms • Conﬁg Settings used• Nodequeues by many modules & core• Blocks Commerce Features • Product Types
Conﬁg Settings Module Files(In Drupal Database) (can be version controlled)CCK Field + Content Types Exported as Modules Views Permissions
Why is this useful?Saves time for more important stuff
Basic Uses of Features Learning Learning how other people do Drupal things by installing their features Kickstart Even made 2 “events” content types inProjects by Drupal? Why do that work twice - Recycling Export a feature and import to new project.
Advanced Uses of Features Improved Different team members workCollaboration on database dependant parts at Workﬂow the same time Helps the This issue comes up where you’ve got “content a live site with changing content. Freeze” Deployment Features can help apply changes to the Problem Live server with little or no down- time.
Features Setup In “Modules” add a few extra folders to keep things organized./sites/all/modules/contrib << Put all contributed modules including “features” module in here/sites/all/modules/custom << Put you custom project modules in here/sites/all/modules/features << Put the modules generated in features here.
Features SetupInstall “Features” and “Strongarm” Modules... sites/all/modules/contrib/features sites/all/modules/contrib/strongarm ...then Enable them
LOL CatZ Review so FarModules Installed What’s Been DoneViews Created “Review”CCK content TypeImage Cache (and dependant CCK modules)Admin Menu Made Homepage ViewBackup & MigrateFeaturesStrongarm
Demo #1 - Installing Other People’s Features http://community.featureservers.org (Click Actus)Demo #2 - Making our own feature
Features “Cheat Sheet” http://nuvole.org/blog/2011/mar/25/code-driven- development-cheatsheet Features “Naming Conventions”http://drupalcode.org/project/kit.git/blob_plain/refs/heads/ master:/kitf.txt