This guide assumes that you have already setup Umbraco on your Winhost.com account. If you haven't, please follow that guide first.
Settings up Umbraco to support multiple sites is relatively easy. Connect to your existing installation via FTP, and navigate to the config directory. Open the umbracoSettings.config file and under the requestHandler section of the configuration file you will see a child node called useDomainPrefixes. Make sure this is set to true:
1: <requestHandler>
2: <useDomainPrefixes>true</useDomainPrefixes>
3: <!-- excluded for brevity -->
4: </requestHandler>
Now login back into your Umbraco administration. Under the content section you'll have the default site installed with the Runway or Creative Website Starter Kit (CWS), which is my preference. The plan is to create a number of home pages for each site you plan to support, all linked out from that base Content root node.Add your first website. Name it sensibly, because you'll need to know what it is easily if you have a number of sites. Right click on the new home page you have added and click on Manage Hostnames. Enter the domain name, select the language and click Add new Domain. You can add multiple domains to a single content root node if you want, but normally you wouldn't want to or need to.
Repeat this process to add all of your new root home pages for each site you want to support. Your Umbraco content section will look like this:
Now you need to add the domain pointers to your Winhost account. Login to your Winhost.com control panel. Select to manage the appropriate site and click on Domain Pointer. Add the new domain pointers you require, and enable the email alias if you need it. If your domains are not currently managed by Winhost.com, then you will need to login to your domain name registrars control panel and set the name servers to be the Winhost ones.
Now your domain names are pointed at the right name servers, that are in turn pointed at the right IP address, that in turn knows which directory to map to via the domain pointer and finally Umbraco knows which content to dispatch to the client based on the hostnames you have setup inside Umbraco.
Now you should be able to visit each domain and see the different home pages you have setup under Umbraco.
You'll notice that all of your sites have the same design template. If you installed CWS then every site will have that rather slick grey / pink theme, but what you really want is different themes for each site.
To get this to work you need to understand the Umbraco concepts of Templates, Document Types and CSS Stylesheets. Templates are rather standard .NET master and content pages with bits of Umbraco focused controls thrown in. For each different theme you require, you'll need to create a master, and the associated content pages under the Settings - Templates node. The current CWS Master and child pages would be a good place to start.
Once you have your Master and child templates created, then you'll need to focus your attention on the Document Types. CWS will have installed a bunch of Document Types for you. Each will be using the template from the CWS installed templates. I highly suggest that you start to create your new Templates and Document Types, following the CWS convention, but prefixed by the theme name you are creating, otherwise you are going to end up with multiple Home Document Types and go quite quickly insane. The example here shows 1-Master and 1-Home, relating to Theme 1.
Once you have got your Templates and Document Types setup for each theme, then you can change the Content home pages to use the new Template themes under the Properties tab of the content editor.



0 comments:
Post a Comment