Increasing the length of the NodeAlias

   —   

This article gives you instructions on how to increase the length of the NodeAlias property:

ATTENTION: the below configuration changes were no longer tested on Kentico 11, 12 and Xperience 13! It may cause serious issues and data loss. It was also removed from documentation, marked as obsolete in Kentico 12 as it was causing more issues than benefits. Use it at your own discretion! 
You may rather use extra field for your page type. One, with the shorter value for the alias and URL paths and one, with the long value to be displayed on the live site. Long URLs are also not SEO friendly. 

Let’s say you need to increase the NodeAlias length from 50 characters to 100. In this case please follow the steps below:

1) Edit the ~\CMSModules\Content\CMSDesk\Properties\Alias_List.aspx file and increase the MaxLength value of the txtAlias field (for example to 100):
<cms:CMSTextBox ID="txtAlias" runat="server" CssClass="TextBoxField" MaxLength="100" />

2) Add following key to your web.config file:
<add key="CMSMaxNodeAliasLength" value="100" />

3) Remove following Views from your database:
View_CMS_Tree_Joined_Linked
View_CMS_Tree_Joined_Regular

4) Increase the nvarchar size from 50 to 100 of the NodeAlias column in the CMS_Tree table

5) Increase the nvarchar size from 50 to 100 of the NodeAlias column in following procedures:
Proc_CMS_Tree_MoveNodeAlphabetical
Proc_CMS_Tree_InitNodeOrders
Proc_CMS_Tree_OrderAlphaAsc
Proc_CMS_Tree_OrderAlphaDesc

6) Run two attached sql (View_CMS_Tree_Joined_Linked, View_CMS_Tree_Joined_Regular) scripts to regenerate deleted views    

-jh-

 


Applies to: Kentico CMS 7.x

 

Share this article on   LinkedIn