Alias path on multilingual MVC site

Alexander Holmgren asked on November 27, 2019 11:28

Hi,

We have a multilingual kentico 12 MVC site and when we create new pages by "Copy content from another language" or "Create empty page", the alias path is the same for all languages. This means we will have a swedish url for the english version of the page. Is there any way to resolve this so the alias path is different for each language?

Recent Answers


Roman Hutnyk answered on November 27, 2019 13:20

When you're using MVC all the routing happens there, in MVC application, through routing.

There is an example of how you could configure routing for multilingual site in documentation: https://docs.kentico.com/k12/multilingual-websites/setting-up-multilingual-mvc-projects

1 votesVote for this answer Mark as a Correct answer

Jesper Allestam answered on November 28, 2019 08:53

But the Alias Path is set through the CMS isn't it? The problem here is not the routing, that is set up after the recomendations in the link. The problem for us is that the Alias path is the same in all languages. For example... When we create a page in Swedish it gets the Alias path /utveckling/forskning/ (which is in Swedish) and when we create an English variant of that page it gets the same Alias path. This means that the english url will be /en-US/utveckling/forskning/ but it should be /en-US/development/research/. We can't find anywhere we can change the Alias path for the page and it doesn't change when we change the name on the document either. What are we missing?

0 votesVote for this answer Mark as a Correct answer

Jesper Allestam answered on November 28, 2019 09:23

I've tried a little bit more now and I created a new page, this time in English. I called the page "English Page" and the name path and Alias path was set correctly.

After that I created a Swedish version by choosing "Create Empty Page". I called that page Swedish page. The new Swedish page got "/Swedish-page" as Alias Path and "/Swedish page" as Name Path, so far so good.

I then checked the English version and it has changed Alias path to "/swedish-page". Name path is still "English page".

As I see there are two problems here.

  1. The different language versions of a page gets the same Alias path regardsless of how you create a page.
  2. There's no way for me to change the Alias path of the page. if I change the name of a page, it still has the old name as Document name, Name path and Alias path.

Is it supposed to work this way and if so why?

0 votesVote for this answer Mark as a Correct answer

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