Spaces is an API module intended to make configuration options generally avaliable only at the sitewide level to be configurable and overridden by individual "spaces" on a Drupal site. It has been described as:
- A way to make one Drupal site act like several sites
- A way to provide much more configurable, full-feature Organic Groups or user homepages
- A generalized API for contextual configuration
Spaces leverages Features to allow administrators and other modules to define "features" in Drupal. These features can then be enabled, disabled, or set to more specific settings per "space."
A space is essentially some aspect of Drupal that might be leveraged to group content and settings together. For example, a group space might act as a collaborative workspace for a team; a user space might act as a personal blog, calendar, and gallery; a taxonomy space might act as a whole thematic section to a site.
A typical spaces setup consists of:
spaces.module-- the core Spaces module. Required.
- Any number of space type modules. Currently, the following space type modules are packaged with spaces:
spaces_taxonomy. At least one of these modules should be enabled, and more than one can be utilized simultaneously.
- Any number of spaces feature modules. Spaces comes with the module spaces_core which provides integration against the Drupal core blog and book modules. You can build your own features for use with spaces fairly easily using CCK, Views, Context, Features, and other Drupal modules.
Once some combination of these modules are installed, you will want to do some additional setup.
To gain access to the current space's menu, you can set your primary or secondary navigation links to the "Spaces" menu (admin/build/menu/settings). For greater control of these links in your theme, you can use the API function
spaces_features_menu() to retrieve the current space's links at any time.
Spaces also provides some useful administration links that you may want to include in your theme. You can access these using the API function
Spaces is based on the concept of path prefixing. A url prefix is defined for each space, and whenever that url prefix is present the associated space will be enabled.
For example, when creating a new group using spaces_og, you might define a prefix "knitting" for the group. To access the group's space, simply go to /knitting on your site.
Features and settings
Once you've set up your first space, you can customize the settings and features for that space using its spaces settings page. The location of this page varies by space type -- for groups and users, it is located under the "Features" tab on the group node (e.g. node/43/spaces/features or user/7/spaces/features).
In addition to customizing features and settings on a per-space basis, you can provide presets to your users to make setting up a new space very easy. On the spaces presets administration page (admin/build/spaces), you can add new presets (the process is nearly identical to configuring features and settings for a space), disable/enable existing presets, and choose a default for each space type on your site.