Do you need multiple sites or multiple domains, all based out of the same Drupal install and database, but with certain settings different across those sites? Do you need to be able to share some content across sites and separate other content? It's easy to create multisite / multidomain setups with the Sites module, even if you don't have any PHP/development experience.
Sites integrates the PURL module directly with Context, Views, and other modules without going through the Spaces and Features modules. PURL allows code to react to certain elements of a URL (domains, subdomains, path prefixes, etc.). Sites listens to PURL and gives Context, Views, Node, and other modules a way to respond differently to different URLs and enable/disable settings and content accordingly.
Sites offers multi-site / multi-domain functionality that is in many ways similar to both the Domain Access module and the Spaces module. Its basic architecture is a great deal simpler and more lightweight, however. This introduces a tradeoff -- Sites is faster and easier to set up, but does not provide as deep a degree of content/settings segregation as the aforementioned modules.
- Views that see content across all sites
- Views that see content confined to a single site
- Different active theme for each site
- Different primary and secondary links menus for each site
- Different front page for each site
- Different site name for each site
- Different /node listing page for each site
- New sites_maintenance hooks which allow modules to clean up the database and perform other tasks.
- New hook_siteapi which is fired on a variety of different events.
- New cookie functionality which remembers which site a user last visited so they can be directed there automatically.
Unlike Domain Access, Sites simply provides a wrapper around node_access, rather than actually integrating with the access grants system. This means that Sites does not require costly rebuilds of the node_access table. Instead, it offers its own hook_site_access. At present, the heaviest weighted module implementing the hook defines whether or not a user can perform operations on a node (this will be modified soon to adhere to standard Drupal practice of using hook_x and hook_x_alter). The default implementation (sites_site_access()) first checks whether the node is a member of the current site and, if so, then calls Drupal's standard node_access() function.
Sites 1.x is no longer supported, meaning that you can't use any of Sites' new features with Context 2.x. You'll need to grab Context 3.x to continue to use new releases of Sites (don't worry, there's an upgrade path for both!)
Submodules packaged with Sites (3.x-dev branch):
- Sites Clone (clone a menu and nodes into a site)
- Sites Extra Fields (add extra data to a site object by connecting it with a node)
- Sites Import Export (import and export menus, nodes, and sites; requires the Node Export module)
- Sites Path Aliasing (allow the same Drupal URL to be reused on different sites to point at different nodes
- Sites Taxonomy (associate each site with a Taxonomy term so that applying the term to a node assigns it to a site)
- User integration
- Better Strongarm integration
Do you want different themes on each site? Use Context Reaction: Theme to activate different themes based on which Site Context is currently active.
The 7.x-1.x will be a direct port of the 6.x-2.x version of the module.
New features will be introduced in 7.x-2.x. Here is a list of introduced features:
- Removed dependency on Context Module in favor of simple static variable
- Added support for Rules module
- Added support for Features module
- Added access plugin for Views
- Added views field for Site Name
- Panels integration: CTools access plugin
- Some minor UI improvements
- Maintenance status: Minimally maintained
- Development status: Under active development
- Reported installs: 102 sites currently report using this module. View usage statistics.
- Downloads: 8,428
- Last modified: December 2, 2014
- Stable releases for this project are covered by the security advisory policy.
Look for the shield icon below.