Creating and configuring bundles

Last updated on
21 March 2017

At Administration > Configuration > Development > Features > Configure bundles (admin/config/development/features/bundle), an admin screen similar to the Drupal core language negotiation screen, site admins can create bundles and enable, reorder, and configure packaging assignment methods.

Features create bundle form

What is a bundle?

In most cases, the first thing you'll want to do when working with Features is to create a bundle.

Just what is a bundle? You can think of a bundle as a set of features that share a common namespace.

A custom bundle includes a machine name that serves as namespace: a prefix that will be used for the machine name of all features that use the bundle. For example, if you use "banana" as the machine name for your bundle, all features that you generate as part of that bundle will be named beginning with "banana_". A "page" feature would be named "banana_page".

Each bundle has its own configured set of assignment plugins that control how configuration is automatically packaged up into features in the bundle.

The special Default bundle

When you first install Features, it comes with a built-in bundle called "Default". This bundle

  • It doesn't provide a namespace. Features created using the default bundle will not receive a name prefix. For example, a "blog" feature created with the default bundle will have the machine name "blog".
  • Some of the default bundle's properties (its name and its machine name) are locked.
  • The default bundle cannot be deleted.

Configuring the default bundle

The default bundle comes preconfigured with package assignment plugins. If you want to change the configuration:

  • Start at Administration > Configuration > Development > Features > Configure bundles (admin/config/development/features/bundle).
  • Ensure "Default" is selected for "Bundle".
  • Configure the package assignment plugins.
  • At the bottom of the form, click "Save settings".

Creating a new bundle

To create a new bundle:

  • Start at Administration > Configuration > Development > Features > Configure bundles (admin/config/development/features/bundle).
  • Select "--New--" for Bundle.
  • Fill in values. "Name" and "Machine name" are required.
  • If you want to create an install profile with the bundle, check "Include install profile" and give a machine name for the install profile (which can be the same as the machine name for your bundle). Including an install profile is usually a good idea, as it makes it easier to install your set of features on a new site.
  • At the bottom of the form, click "Save settings".

When you create a new bundle, it inherits the assignment plugin configuration of the default bundle.

Deleting a bundle

To delete a bundle:

  • Use the "Bundle" select to select the bundle's name.
  • Click "Remove bundle".

Editing an existing bundle

To edit an existing bundle:

  • Start at Administration > Configuration > Development > Features > Configure bundles (admin/config/development/features/bundle).
  • Use the "Bundle" select to select the bundle's name.
  • Edit existing values. "Name" and "Machine name" are required.
  • At the bottom of the form, click "Save settings".

Help improve this page

Page status: No known problems

You can: