Technical Questions Technical questions on Kentico CMS Connector for Microsoft SharePoint.
Kentico CMS Connector for Microsoft SharePoint > Technical Questions > adding a culture and changing url structure View modes: 
User avatar
Member
Member
lightworkweb - 5/31/2011 11:20:10 PM
   
adding a culture and changing url structure
Hi,

I have a website which is already live using default EN language culture. We are coming up with a new website for hong kong market which will follow the structure www.website.com/hk/zh (traditional chinese) & www.website.com/hk/en (english)

to make it consistent across countries, my singapore website is currently using www.website.com/domainalias/xxx.aspx format.

I need to change the singapore website to follow the same HK structure which is www.website.com/sg/en/domainalias/xxx.aspx (default lang)

does kentico's language/culture be able to restructure the URL?

Thanks in advance!

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/1/2011 2:32:52 AM
   
RE:adding a culture and changing url structure
Hello.

Currently, if you want to change format of culture-related URLs in the other way, than default behavior, you can do it via proper documents structure.

So, if you want to have following url: www.website.com/sg/en/domainalias/xxx.aspx, you can create documents in following structure

Website:
+ root
- sg
- en
- xxx.aspx

So, /sg/en/ part will be an alias path of given document.

What I am not sure with is „domainalias“name in your domain. What does it mean? Is it a virtual directory? Usually, domain alias supplants main domain name, not extends it. If it is a virtual directory, and you do not want it to be a part of a domain in your new URL, it can be handled on your IIS.

Please note we plan some changes in URL Rewriting module in upcoming version 6.0, and there will be better culture-related URLs support as well. For example, following URL format will be supported out-of-the-box: domain.com/<culture>/page.aspx, which is what you want to achieve.

Best Regards,
Radek Macalik

User avatar
Member
Member
lightworkweb - 6/1/2011 3:18:30 AM
   
RE:adding a culture and changing url structure
Hi Radek,

THanks for the quick response.

I get what you mean by creating an alias path. I have 60+ pages published using the default structure. does that mean I will have to create new alias path on a page level?

Is there any other way to do this on a site level? It'll be a tedious work if it's on page level and mistake will be there...

Willy

User avatar
Kentico Support
Kentico Support
kentico_radekm - 6/1/2011 3:44:51 AM
   
RE:adding a culture and changing url structure
Hello Willy.

It should be enough to have a single document with alias path representing your culture code, for example one document with /en/us alias path.

Then, you can simply move all other documents via bulk operation under this new parent, so alias path will be changed automatically after this move.

For this bulk operations (like moving, copying, deleting,...), you can use List tab in CMSDesk / Content section.


Best Regards,
Radek Macalik

User avatar
Member
Member
Willy - 6/1/2011 4:01:35 AM
   
RE:adding a culture and changing url structure
Hi Radek,

I created another document with /sg/en alias path and do a bulk move to this document. When I checked the alias path of the documents, it was not change automatically as you've mentioned.

Is it because there are existing Document URL path for each document?

example of properties below of document that's been moved;

Alias path: /SG/about-directasia
Culture: English - United States
Name path: /SG/about us
Live URL: /onlineinsurance/about-directasia

although when i access the page /SG/about-directasia, it's displaying correctly. i was thinking the live URL should be changed? as this will be the page that search engine will indexed...

Willy

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/5/2011 2:47:16 AM
   
RE:adding a culture and changing url structure
Hi,

Could you please create two documents instead of one? I mean

/root
--sg(1st document) its alias path is /sg
----en (2nd document) its alias is /sg/en

Under this document (en) you can move folder so alias path of documents under this folder will be changed to:

/sg/en/yourfolderaliasname/mydocument

If you define for mydocument Document URL path, for example: /test/path, the document will be accessible from both: Live Url and Alias path:

Alias path: /sg/en/yourfolderaliasname/mydocument
Culture: English - United States
Name path: /sg/en/your folder alias name/my document
Live URL: /test/path


Best regards,
Ivana Tomanickova




User avatar
Member
Member
Willy - 6/5/2011 7:59:10 PM
   
RE:adding a culture and changing url structure
Hi,

This option seems to be working and you're right it's accessible via live url & name path. Just one more clarification; I need Google to index the new URL, will it pick up the name path instead of the live url? I think latter is what it'll pick up.

Thanks for the support.

Willy

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/8/2011 3:57:21 AM
   
RE:adding a culture and changing url structure
Hi,

1. The document is always accessible from NodeAliasPath (its Alias path).

2. Now in Properties of document we can define Document Alias and Document URL path. With document aliases we can define more names under which the document will be available. Using Document URL path we can define the relative url path for the document.

In situation we have defined Document URL path, and send a request to node alias path, we are redirected to Document URL path which will be indexed (the alias path will not be).

If you need to index node alias path version of URL, you do not need to set Document Url path. According to your description it seems that this url is not needed.

You can define several Document Aliases for one document. To ensure that google will index only the main alias, you can check 301 redirection (Site Manager - Settings - URLs & SEO) so only the main alias will be indexed.

Best regards,
Ivana Tomanickova




User avatar
Member
Member
dbaird-myus - 6/8/2011 9:56:10 AM
   
RE:adding a culture and changing url structure
We have also created a Directory structure for languages (e.g. EN, ES, etc)... however, we're running into lots of problems with the MERGE FUNCTION. We *want* to use the merge function. However, something - and we don't know what - is overwriting the CMSPreferredCulture cookie to the default language (english) when the selected Culture (e.g. German) is not available. From that point forward, the visitor is now seeing all the English pages instead of the German-when translated & English-when not translated.

Here is the sequence:
1) Go to Home Page. Default Language is English. Visitor selects GERMAN from drop down. Home Page is Translated into German and shows fine. /de/home.aspx
2) Visitor now goes to AboutUs page which is NOT translated (the merge content and files is ON for the site). The URL displays as /de/aboutus.aspx BUT the language switches to English and the cookie gets overwritten.
3) Now the visitor goes back to Home page and because their cookie was overwritten, the English version displays.

We have tried very hard to id why this is happening. This is happening even using Kentico's webpart "languageselector" ... We think that the directories by language may be contributing to the problem but we don't know.

Please advise.

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/9/2011 2:45:45 AM
   
RE:adding a culture and changing url structure
Hi,

could you please provide more details about "Visitor selects GERMAN from drop down"?

By default, there is not drop down language selector web part in Kentico. Have you created the custom one? If so, could you please test the behavior with the standard Language selection web part?

Could you please specify Kentico version and hotfix which you uses?

Thank you for information.

Best regards,
Ivana Tomanickova

User avatar
Member
Member
dbaird-myus - 6/9/2011 9:14:07 AM
   
RE:adding a culture and changing url structure
We are using Kentico 5.5 R2 (NOTE, Site is NOT live yet ... its in development so we're using trial version). We have run all hot fixes. Current version is "v5.5.4164 R2".

I've taken the development site out from behind the firewall so you can see it - cms2.myus.com

The country dropdown was created by a Kentico certified development company for us but they can't get it to work. They said they used the standard Kentico webpart "languageselector" and modified it to be a dropdown. Note, this is a gold certified Kentico partner. At this point, we're not sure we can move forward because language and merging cultures is so critical to our business. As noted, in my previous post we have setup the Culture as folders/directories (e.g. EN, ZH, ES, DE).

The latest odd behavior can be seen by doing the following: 1) go to home page cms2.myus.com 2) change language to Spanish, 3) click on "Spanish Services" (first item in nav bar), 4) take note of URL and language dropdwon box. 5) now try to change language to English. Notice URL doens't change, Language Box doesn't change and content doesn't change.

Now do slightly different: 1) go to home page cms2.myus.com - make sure language is english. 2) click on "Our Services", 3) take not of url and dropdown box. 4) now change language to spanish. In this case language does not change, url does not change, but page content does change (as evidenced by menu turning to "Spanish Services".

We are at wits end. Should we abandon this entire language switcher and use the one posted in your Marketplace in NOV 2010?



User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/10/2011 4:34:24 AM
   
RE:adding a culture and changing url structure
Hi,

I have tried to reproduce the issue, but when I click on "Spanish Services" I received 404 error message.

Could you please send an email to support@kentico.com and grant me with an access to your site? I would like to test the behavior with the original language selector web part and check the rest of settings on your site.

Additionally, could you please send me the code of the dropdown culture selector web part?

Thank you.

Best regards,
Ivana Tomanickova

User avatar
Kentico Developer
Kentico Developer
kentico_ivanat - 6/22/2011 1:59:23 AM
   
RE:adding a culture and changing url structure
Hi,

this is an info for readers of the thread.

To ensure correct culture handling the following key had to be added to the web.config file

<key="CMSUseCultureForBestPageInfoResult" value="true" />

This key ensures correct culture change when custom document URL path is configured.

The culture drop down list web part from market place seems to be working fine with above configuration.

Best regards,
Ivana Tomanickova