API Questions on Kentico API.
Version 6.x > API > Culture in document aliases View modes: 
User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 7/24/2012 3:32:57 AM
   
Culture in document aliases
I like to exclude folder nodes from the URL. From a previous thread it is suggested to use document aliases.

I only have a problem that the wrong culture is selected when navigating to the url of the document alias.

The documenta aliases are defined for two cultures but have the same URL path.
User image

Is it required that the culture be included in the document aliases (e.g. /nl-be/spider-man)? Or can Kentico redirect to the correct culture based on the defined culture of the document alias?



User avatar
Kentico Support
Kentico Support
kentico_janh - 7/24/2012 7:14:35 AM
   
RE:Culture in document aliases
Hello,

You don't have to specify the culture, if the path to that culture version of your document is specified just for that document:

User image

Best regards,
Jan Hermann

User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 7/24/2012 8:35:00 AM
   
RE:Culture in document aliases
That's not working in my case.

I need /nl-be/spider-man and /fr-be/spider-man to open the same page but in different culture.

If I use document url path /spider-man can only be used once (kentico will replace with spider-man-1 if I add for the other culture)

User avatar
Kentico Support
Kentico Support
kentico_janh - 7/25/2012 2:54:39 AM
   
RE:Culture in document aliases
Hello,

Oh, I've got it now. You can specify just one document alias and its culture version will be available with the culture prefixes, if you set the Use language prefix for URLs to true (Site Manager -> Settings -> URLs and SEO).

Best regards,
Jan Hermann

User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 7/25/2012 3:19:37 AM
   
RE:Culture in document aliases
Hi Jan,

Thanks for the quick response.

I already have that setting on. Actually my problem is to exclude folders from the URL.
According to http://devnet.kentico.com/Forums.aspx?forumid=36&threadid=10141 I have to use the document aliases.

That's why I tried using the same path /spider-man for both cultures which isn't working. I will try using the full url path (with language) in the document aliases.

Any other suggestions?

User avatar
Kentico Support
Kentico Support
kentico_janh - 7/25/2012 6:22:42 AM
   
RE:Culture in document aliases
Hello,

Then it should be enough. Let me show you an example:

1) Create a folder in your document tree (en)
2) Create a document under this folder (en)
User image

3) Create document's culture version in a different language (cz)
4) Your documents are now available on following URLs:
domain.com/en-us/folder/lorem-ipsum
domain.com/cs-cz/folder/lorem-ipsum


5) Set a domain alias to this document to not contain that folder
User image

6) Your documents are now available also on these URLs:
domain.com/en-us/lorem-ipsum
domain.com/cs-cz/lorem-ipsum


7) Here is my configuration:
User image
Best regards,
Jan Hermann

User avatar
Certified Developer 9
Certified Developer 9
jali-scor - 7/25/2012 6:35:49 AM
   
RE:Culture in document aliases
Thanks! That solved my problem.