* Adds a Subsite table
* Adds a SubsiteID to the Group, File and SiteTree table.

Each of the latter tables can therefore hold multiple sub-sites. The URL-uniqueness checker, for example, is updated to only check for unique URLs in a single subsite.

The SiteTree content with SubsiteID = 0 is considered to be the 'default subsite'. Groups and Files with SubsiteID = 0 are considered to be accessible by all subsites.

To create subsites, you should use the Subsites section of the CMS; it's a new main menu item that appears. If you give it a Subdomain, then you can access it. If you're working on a local development environment, a good thing to do is to set up some aliases in your /etc/hosts file so that you can access your local development environment with multiple aliases:

thanks for the info - now i know how it should work - but it do not at my installation.
I don't know if you are in the mood to help me with a trunk-module, but this module would be very important for me to use.

I have three problems:

(1) After uploading the module, the installation is not accessible. After i commented these two lines in _config.php i can run "db/build?flush=1" and one Table "subsite" are created (should be another one created: "subsite_templates"?!).

(2) I cannot choose a template at the "add-subsite-dialog"

(3) I have to create the subsites manually in the db, because i get the error: Fatal error: Call to a member function createInstance() on a non-object

(4) I don't get the dropdown at the top-right to select the created subsites.

[edit 15:26] Ok, found out that only the Object::add_extension('Group', 'GroupSubsites'); has to be commented out to get /db/build giving a positive result, so there should be the problem for me, anyone any idea where to look for?

[edit 15:54] Well, added the column SubsiteID (int(11), not null default '0') to the table "groups" manually and added an index to it. Now i can remove the comment for Object::add_extension('Group', 'GroupSubsites'); and call the website without any errors.
After entering the CMS i can't find the "subsites"-menu tab, so up to the next issue :-) Any input on this one?

[edit 03-08-08] After i searched for something like a rights problem i discovered that the daily build of Silverstripe had a bug concerning setting rights to groups (rights are set to groupID=0 instead of groupID= id group editted) i installed the latest stable download from the website, did the things above to get Subsites running and voila, "Sub-sites" appears into the CMS menu :-) Can some explain how to assign templates to individual subsites?

After i added a new subsite (my first), silverstripe crashes with an error:

FATAL ERROR: DataObject::get_by_id passed a non-numeric ID #
At line 1669 in /var/www/vhosts/lodown.nl/httpdocs/SilverStripeSite3/sapphire/core/model/DataObject.php
user_error(DataObject::get_by_id passed a non-numeric ID #,512)
line 1669 of DataObject.php
DataObject::get_by_id(Subsite_Template,)
line 101 of SubsiteAdmin.php
SubsiteAdmin->addintranet(Array,Form)
line 238 of Controller.php
Controller->run(Array)
line 104 of Director.php
Director::direct(/admin/subsites/)
line 158 of main.php
Context
Debug (Debug::showError() in line 180 of Debug.php)
* callerClass =
Subsite_Template
* id =
Fatal error: Call to a member function createInstance() on a non-object in /var/www/vhosts/lodown.nl/httpdocs/SilverStripeSite3/subsites/code/SubsiteAdmin.php on line 113

Great, but after adding manually a record to Subsite like Sam discribed above, i'm able to successfully add more subsites and templates :-) But, now the dropdown at the top right is missing, needed to switch the trees for the different subsites. I discovered that ?flush=1 or manually deleting the cache content located in /tmp does miracles, and in this case it did, the dropdown shows up :-)

I'm curious how to add different templates to the different subsites. The definition of "Template" within the module configuration is another one than "template" as the visualisation of your website, it's only a way to quickly create subsites from default settings.

Sam and other users, how do i set the allowed_themes and allowed_domains for the module?