Umbraco 7 Multiple Domains and Languages - umbraco

I have searched but not found a definitive answer so far (honest!).
What I would like to set up is multiple domains, each with 1 or more sites (within a domain, there could be 2 sites, one each for different languages).
eg
DomainA
English site
French site
Domain B
English Site
German Site
Domain C
English Site
Domain D
English Site
etc
Ideally :
Some content could be shared between sites on either the same or different domains (eg, global page showing links to all the possible sites)
Content editors could be defined that could only edit content on their allocated domains (eg an editor could edit Domain A content English or German but not Domain B or Domain C)
Visitors could not access pages from another domain
eg if there is a page 'NewsList' in Domain B (http://domainb/newlist) they shouldn't be able to view if from Domain D (http://domainc/newslist) from the navigation structure nor by typing in that URL.
Some domains may in the future require authentication to visit (not top priority)
Need to be able to configure site specific properties (currently doing this by creating a site lookup document type, and using #Umbraco.Content(docid) to look it up and retrieve values)
Can all this be achieved in a single Umbraco instance, or do we need to set up multiple databases and multiple instances (using MSSQL)?

it is possible to render content from a global node on other pages
it's possible to provide a user with a root node. This root node can be on every domain. Eg: domain B (including EN & DE). But NOT domain C and D (but not A & B). If you want something more complex, ask on the forums (https://our.umbraco.org/forum/)
pages are NOT shared cross parent nodes (being domains and languages)
you can protect pages
properties are defined on your document types, there is currently no security rules for properties. They only way to solve this is to create sub document types with the specific properties and to use those document types on the right domain. You could however enforce this by subscribing to the Save events.

Related

How to set umbraco to accept the same email for multiple members

I have Umbraco 7.5 and I need to set the same email address for different members. How to do it?
My scenario:
I want to have different permissions for different parts (lets say sub-organization) but for a short time the contact person of 2 of those parts are the same. and it can happen again
In your web config file search for UmbracoMembershipProvider which contains the settings for the member logins. Then set the property requiresUniqueEmail to false and hit save.

Locale based information on International site

We're building an education platform. The site it's going to be published in different countries, having each country its own subfolder. For example,
France: http://myedusite.com/fr/
Spain: http://myedusite.com/es/
The site has courses belonging to providers
courses have different themes (Arts, Business, Science) and these themes have sub-themes (I'm planning to use ancestry to have a tree structure model)
Courses
providers can create courses if they have an account. The courses created will be published only in the domain they were created.
As an example, if I'm a course's provider and I create an account in http://myedusite.com/fr/, then the courses I create should only be published in http://myedusite.com/fr/.
For this purpose, I thought of defining a Country model with the field iso_3166. This field would be populated with the country codes defined in ISO 3166.
Then, the courses would have a target_country (class: Country), enabling the possibility of choosing where the course is published (if the course's target_country is France it should only be visible in http://myedusite.com/fr/).
Themes
For themes happens something similar, where for each country where the site exists there can be different themes. When a user arrives to http://myedusite.com/xx/, only themes existing in country "xx" will be shown. That implies that each theme should belong to a country.
On the other hand, each course would have one theme.
For dealing with country related information (for example loading cities for a country) I thought of using the country gem.
From the business perspective, we have chosen a bottom-top approach, meaning that only the necessary things are built now, adding features as it's needed.
I see this as a reasonable strategy to make the site international. What I'm afraid of is of choosing wrong and having trouble on the future as new features arrive. I would like to have as much flexibility as possible.
It's the first time I design an international project. Is the approach I've thought of something usual in this kind of sites? Anything I should pay attention to that I didn't mention?
I use navigator.language to get the locale and redirect from JS to whatever URL I want, or add it as a query string. In your case since you only want the language you should split it first, then redirect. In my case I use the full locale code because en is different from AU, US, CA, GB and so on, you'd probably want to consider doing the same especially if you will be displaying prices, dates and so on.
I think there is a way to get this with Rails too, see the Accept-language, accept charset headers.
Once you pass the language/locale to your controller you can then filter data as required.
This also leaves room for some nice SEO tricks if you set up a custom 404 page, engines will go for this.

How to implement versions by country on Rails web app

I need to create a web app that would be different for each country (and not only different language). Let's say the website lists insurance solutions in the country.
For example, users in France typing example.com would need to be sent to http://france.example.com and American users would go to http://us.example.com
All websites would have the same display/layout but the content in the pages would vary as insurance and companies are not the same in each country.
What I'd like is:
in my backend: Manage multiple "country versions" on which I can work to improve features, layout, etc. in a single time without having to update the code on each version. All country versions would stay in similar stat this way.
in the backend: create a filter that "sends" the insurance item I input in my backoffice into the right country-wesbite.
it means for example that the page describing an insurance ALpha in France would only exist in the france version (http://france.example.com/alpha_insurance_description) and not in other country versions.
What kind of architecture must I implement? Are there Rails gems that answer this kind of problematic? (if not maybe some websites describing how to create this kind of multi-country website)
"multi-tenancy" is what you want. The following two railscasts explains two different approches to achieve the same.
http://railscasts.com/episodes/389-multitenancy-with-postgresql
http://railscasts.com/episodes/388-multitenancy-with-scopes
Also you can use subdomain-fu, for subdomain handling and route validation.
I would just use the geoIP data (or user preferences) to find out which country to show and have the content stored in the DB (e.g. insurance companies) with a country code. Seeing as an insurance company will have an address and postcode anyway, this should be pretty simple. That way, both the content and the site language can be set dynamically.
As for the subdomains, you can CNAME all of them to your main site and use a little piece of Rack middleware (hand rolled) to redirect requests to the right subdomain if necessary. After that, the site ignores the subdomain itself and just server content dynamically. Alternatively, you could have some code in the application config that reads the subdomain from the Rack request, extracts the country code, and sets it as a config variable that you then use to flag what country code to use when showing the dynamica content, setting the language, etc.

How to use internal links with wildcard items in Sitecore?

I have a multiple site Sitecore solution. All the sites share a product range which is stored inside a 'Shared data' node that sits at the same level as the root nodes of the sites. The individual product pages on a site use a wildcard item to lookup the product based on the last part of the URL.
This means that we can't use internal links in the rich text editor to point to the product page on any of the sites because the product item does not have a specific site URL.
Does anyone know of a way to overcome this, or perhaps know of a way to augment the default behavior of interal links?
Have you considered using cloned items, see here for details.
This would allow you to share the content whilst having the appearance to the end user of the Products being inside the content tree allowing you to use the RTE and internal link look ups?
For extra information about clones, see here and here
You'd also need to do some work in the link provider to link to the cloned version of a product if you wanted. See this question.

Serving different pages as different Domain Names in IIS (6 or 7)

I have a ASP.Net MVC application which serves user pages with URL like -
www.myapp.com/user/rob/index,
www.myapp.com/user/rob/article/1
and
www.myapp.com/user/scott/index,
www.myapp.com/user/scott/article/1
now I want this one application to serve pages to two different domains from outside. Like -
www.RobWebSite.com/Index
www.RobWebSite.com/article/1
www.scottBlogSiteNoOne.com/Index
www.ScottBlogSiteNoOne.com/article/1
what kind of setup / redirects / proxies I will need to setup so when user types the published domain name (www.RobWebSite.com) it translates internally to my app as (www.myapp.com/user/rob/). I want to keep the url in the browser the same what they typed, while just query string parameters changes.
Thanks and Regards,
Ajay
Each users' domain name will need a CNAME record in their DNS that points to myapp.com. (Google uses CNAME records to point custom domain names to Blogger.com blogs, so that seems like a good way to go.)
Then your code needs to look at the Request object to identify which domain name is being used and do a lookup to find which user the domain belongs to. This wouldn't really be translating to myapp.com/user/name/. It would be using the domain name to determine the user instead of the route parsing that you would normally do with MVC.
I'm not 100% sure that the Request object will give you the right domain name. You'll have to try it out.
You could also just setup your code so that your urls specify relative paths rather than absolute URLs. This will keep the domain name the same in the browser and improve performance.

Resources