Sub-sites under subfolders

Tom Troughton asked on May 26, 2015 11:22

We have a client who wants a single website with country targeted subfolders. So domain.com/ge and domain.com/fe behave effectively as separate sites with their own navigation structure and their own languages. To be clear, these aren't translations of the same site, they are sub-sites with differing content targeting the company's presence in that country.

I've seen this is possible with separate installations of Kentico running in virtual directories beneath the top virtual dir. But this isn't what I'm looking for. I'm looking for something closer to the Intranet example site in Kentico where departments have their own master page and navigation.

My guess is that this approach won't allow these sub-sites to define their own languages - is that correct? Would I have to define all required cultures for the main site then use some custom navigation to only expose certain languages in the sub-folders?

Also, apart from languages are there any other limitations to using Kentico this way?

Recent Answers


Petar Kozjak answered on May 26, 2015 14:36 (last edited on May 26, 2015 14:37)

Hi,

intranet template idea could work for you. Also you said this won't be translated site, but more like separate site with their navigation.

What you can do is create this sub sites (like departments) in language that you want and then in domains define where each sub domain (domain.com/ge) goes to. Yes you can define language only on some documents. Change language and create new content (in that department). No need for custom navigation, you can create new master page on sub-pages that will have assigned language (Master-Page-gr or Master-page-Fr).

Problems that you can face with this configuration is messy tree and content. ULR's won't be your problem because you can customize them.

I didn't try this, but I know we had something similar few years ago on version 6 and it did work for us.

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on May 26, 2015 15:54

Thank you Petar. If you don't mind, I'd really appreciate some additional info:

  1. When you say I "can define language only on some documents" are you saying I need to define all required cultures at Site level then simply only add the required language versions to pages under my country subfolder? Or is there a way of actually setting the allowed cultures at different points in the content tree?
  2. Can you point me to docs about language-specific master pages? I can't find anything in Kentico docs...

Thanks.

0 votesVote for this answer Mark as a Correct answer

Petar Kozjak answered on May 27, 2015 12:21

Hi,

  1. First you will define languages in sites. Then you will build site on first language. To create sub sites for other languages you will switch language and create page templates as you did for first language but now it will be in another language. Then in sites you can define domain domain.com/fr and point it to sub site location (path). So when someone opens domains.com/fr will read that part of the site (your sub site).
  2. So when you switch to another language start building site in sub-folder location as you would do for any language.

Here is one document that could help: https://docs.kentico.com/display/K8/Developing+unique+page+templates+for+specific+languages

1 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on May 28, 2015 11:05 (last edited on May 28, 2015 15:37)

Thanks Petar. I have tried your advice but having trouble with domain aliases. I have the Intranet example site, added French language, created new department called French with French content.

The main site is running locally using domain dev.domain.com. I added a custom domain alias dev.domain.com/french with alias path /Departments/French/Home.

However, although http://dev.domain.com/Departments/French loads correctly, http://dev.domain.com/french returns a 404.

What am I doing wrong here?

Update:

I have found that replacing domain alias dev.domain.com/french with localhost works OK. Are you sure it's possible for a domain alias to include a subfolder?

0 votesVote for this answer Mark as a Correct answer

Tom Troughton answered on June 3, 2015 12:35

Just bumping this because I still don't have an answer. It's possible I misunderstood Petar's advice. Petar, where you mention domains I assume you're talking about domain aliases. Am I right? If so, your advice doesn't work for me because it doesn't seem possible to define a domain alias with a sub-directory.

To restate my requirement, I need a domain.com site which, for example, has 2 translations (domain.com/en-gb and domain.com/fr-fr). This site also has region-targeted sub-sites on the same domain so, for example, domain.com/france would have its own navigation and potentially own translations (domain.com/france/fr-fr and domain.com/france/de-de).

Logically in the content tree I need these country sites to be grouped under one node, so domain.com/france would actually be domain.com/Countries/France/Home. Or event better, I'd ideally have these country sites managed as separate Kentico sites which are somehow configured to load under URLs as described with one root domain.

Is there any way to achieve this in Kentico?

0 votesVote for this answer Mark as a Correct answer

   Please, sign in to be able to submit a new answer.