This project is read-only.

Subsites in orchard

Topics: General
Feb 18, 2013 at 5:50 PM
I want to use the Orchard cms for developing my website. But the requirement is to have a site for each country under the same domain something like a subsite.


when the user logs in we have to check where the user comes from and redirect the user to the corresponsding website.

In Orchard I think we can create only 1 website and i am not sure how to add subsites like how we can do in Sharepoint.

Please let me know if it is possible in Orchard.
Feb 19, 2013 at 1:39 AM
In Orchard we have a concept called "Tenants". Each tenant uses the same Orchard instance, but has its own set of DB tables (possibly the same DB but differentiated by a prefix, or one DB per tenant, that's up to you).
In your case you could have one tenant per country, where each tenant is matched by the country code in the url, e.g. /uk and /au.

However this may not be the best solution in your case because each tenant will have its own Users table, and you probably don't want to sync users between all the various tenants. Now you could get around that by implementing a custom user service that checks against the store of your choosing, regardless on which tenant your user lands.

Alternatively you could implement a custom module that supports subsites. A "SubSite" would be a content type that acts as a container for various content types, such as Menu, Page and Blog. Using AutoRoute you could then configure the various types to include the country code configured on the SubSite level.