Kentico CMS 6.0 Developer's Guide

Multiple document aliases

Multiple document aliases

Previous topic Next topic Mail us feedback on this topic!  

Multiple document aliases

Previous topic Next topic JavaScript is required for the print function Mail us feedback on this topic!  

In Kentico CMS, it is possible to have an unlimited number of different URLs leading to one document. These can be set in CMS Desk, on the Properties -> URLs tab of each document:


Document alias - this is the unique name of the document in the given section of the website. If Media is the value, then <domain>/Media.aspx is the URL under which the document can be accessed by default.


Document URL path - the fields in this section can be used to specify an alternate URL for the document. If you enter /Medialibrary, the page will also become accessible through <domain>/Medialibrary.aspx


Further document aliases can be added in the following way:


1. Sign in to CMS Desk, select some document from the content tree and switch to its Properties -> URLs tab.


2. Click the NewTransformation_6.0 Add new alias link in the Document aliases section.




3. Fill in the following details:


Path type - you can choose several different URL types for the alias path. The selection made here determines how the value of the Path or pattern field will be processed.

Path or pattern - enter a URL path for the document alias according to the selected Path type:

Standard URL or wildcard - the alias URL will be handled by the standard Kentico CMS rewriting engine. Wildcard URLs can be used here, as described in Wildcard URLs.

Route - the alias URL will be processed as an ASP.NET Route pattern.

MVC - requests to the alias URL will be handled as requests for an MVC page. Please see the MVC development model chapter for more information.

Default controller (MVC only) - the name of the MVC controller containing the action that should be performed when the alias URL is accessed, without the Controller part at the end. E.g. if the controller class is called NewsMVCController, enter NewsMVC. The specified controller is first searched in the CMS.Controllers.<current site code name> namespace. If it is not found there, it is searched in the CMS.Controllers.Global namespace.

Default action (MVC only) - specifies the action defined within the controller that should be performed when the alias URL is accessed.

Culture - sets which culture version of the document will be displayed when the page is accessed through the URL of this alias.

URL extensions - additional supported extensions of the URL. For these to work, you will have to configure the system as described in Custom URL extensions and extensionless URLs. This field is optional.

Track campaign - visitors who access the document through this alias will be assigned to the selected web analytics Campaign and tracked accordingly. For example, a special alias may be created for a document and its URL can then be used by links contained in marketing materials such as banners, e‑mails etc. This way, the system will monitor how many page views the website receives as a result of the campaign and track the activity of the visitors who arrive as a result. This field is optional.




Click OK to create the alias.


4. Now if you switch back to the Properties -> URLs tab of the document, you should see the newly created alias present in the list in the Document aliases section, as depicted in the screenshot below. Like this, you can add an unlimited number of aliases.