On this page
Building a distribution with Features 3.x
The main use case for Features 3.x is to assist with building and maintaining well designed and interoperable Drupal distributions.
See also the page on Features' interoperability.
Site building for packaging
The following tips will help ensure your site configuration is ready to be correctly packaged.
- Before beginning to build out a new area of functionality, select a machine name to use. For example, for an event-related feature, you might use the machine name
event
. - When adding new configuration, decide if it's specific to the area of functionality. If it is, give it a machine name that's prefixed with your feature machine name. For example, a vocabulary used for types of events is specific to the
event
feature and could be namedevent_type
. A date field specific to the event content type might be calledevent_date
. However, a tags vocabulary used with events but also potentially with other content types shouldn't get the prefix and could be named simplytags
. Following this naming pattern will ensure that the Namespace package assignment plugin can correctly assign your configuration to an appropriate feature.
Adding an install profile
If you select the option on the package generation screen to add an install profile, or use the equivalent Drush command, your generated code will include a basic install profile adapted from the Standard profile that ships with Drupal core. If you've downloaded an archive, you can extract it into the profiles
directory to test installing your new distribution. If you used the Drush command, it will automatically be written to the profiles
directory.
If you edit the generated code (either the profile or a contained module), your changes will be retained when you next generate the packages.
Help improve this page
You can:
- Log in, click Edit, and edit this page
- Log in, click Discuss, update the Page status value, and suggest an improvement
- Log in and create a Documentation issue with your suggestion