Computer Magic Logo

Sunday, August 9, 2015

Published by Aristotelis Pitaridis

Let’s create the pages in order to see what we have done until now. We create three pages like the picture below.

For the root node we type the name en which is going to be the English root node and its document type is Language.

Inside the en node we have two pages. The first page is the Home page with the following information.

We add one more page in the en node which is going to by the Company page with the following information.

We have almost made a workable site. If we try see the Home page and the Company page they work fine and the URL of these pages are /en/home and /en/company. The problem is that if we try to visit the root and the /en URLs we will see an error message informing us that no template exists to render the document.

In order to resolve this we are going to use the Umbraco Internal Redirect property that we created in the Language Document Type. We open the en page and we scroll down in order to see the "Umbraco Internal Redirect" property.

We click the Add link next to the property which will have as a result to display the Page selector in order to select which page will be used as an Umbraco internal redirect. This means that we select the page that Umbraco will display when we visit the /en url.

If we hover over the en page we will see an arrow on the left side. If we click this arrow the node will expand and we will be able to see the client nodes.

We click on the Home page in order to select it and the selection will appear next to "Umbraco Internal Redirect" property.

Now we click the Save and Publish button in order to save the changes. Now if we try to visit the / and /en urls we will see that the URLs work and display the home page of the English language.