Community Documentation

Bundling site settings using Features

Last updated June 8, 2011. Created by clemens.tolboom on September 17, 2009.
Edited by Carolyn, marcvangend, arianek, lyricnz. Log in to edit this page.

So, here's the thing: If someone asks you how to make a blog on a Drupal site, you don't tell them to activate the Blog module (which is ready for retirement). You tell them that a blog is easily made with CCK and Views – and some settings that would cover 2–3 pages of fine print.

The Features module shortcuts the work with configuring settings by providing comfortable means for bundling, exporting and importing settings for many of the most used Drupal modules. See this quick intro. Features shifts the site development paradigm from tweak here and there into enabling features.

The main advantages

  • Newcomers to Drupal can quickly deploy a blog, an image gallery and a bunch of other features, while still being able to peek into the fine-print settings.
  • Developers can easily reuse settings in some of the most used modules, including CCK (and ImageCache), Views, Panels, Context, and more.
  • Developers can easily distribute their configurations to customers and developing sites – and update existing ones. There are interesting discussions on distributed features servers.
  • For those of you using Drush: There are some useful Drush commands for managing Features. (Documentation section yet to be written -- se project page for brief documentation.) For those of you not using Drush: Check it out!

Comments

Need to add a section: List of variables to NOT STORE

Maybe broken down into "avoid at all costs" vs, "you probably don't want this"?
An example of a worst-case scenario (http://drupal.org/node/1011626)
Here's a start:
- anything indicating a timestamp (*_last_cron, for example, or *_index_last)
- anything involving cache (cache_*, *_cache), except possibly cache_lifetime
- anything involving installation-related variables, possibly? (intall_task, install_profile, etc)
- content_schema_version
- css_js_query_string
- (anything else?)

-C

"It would be a dangerous undertaking for persons trained only to the law, to constitute themselves final judges of the worth of pictorial illustrations."
-- Justice Oliver Wendell Holmes Jr.

Pointer to "2-3 pages of fine print" and Blog feature

That's a very enticing opening, "You tell them that a blog is easily made with CCK and Views – and some settings that would cover 2–3 pages of fine print." It would be nice to have a pointer to that 2-3 pages, and the Blog feature created from that, to look at, and try out.

Does Features integrate with

Does Features integrate with or provide API functions to use in Installation Profiles? I am exploring different ways to "bundle" a pre-built site so that it can be rapidly deployed. Features seems to offer a lot of potential, but I'm also considering development of an Installation Profile. Is there a way to use both? Can you bundle 1 or more features into an Installation Profile? It seems like Features is much easier to use (in concept) than programming Installation Profiles, so it would be nice to have simple commands inside an Installation Profile that say for instance "use feature feature_name;".

Joel Milne, GoldHat Development Group
www.GoldHat.ca

Yes it intergrates with installation profiles

Features are modules.

So you can make dependencies on features.

nobody click here