1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Getting Around 50 Character Page Title Limit?

Getting Around 50 Character Page Title Limit?

6 posts, 2 answered
  1. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    10 Sep 2009
    Link to this post
    Hello,

    I'm running into a limit of 50 characters when I try to create a new page programmatically. Is there any way around this? I find it quite restrictive.

    Here's my code:
                ICmsPage ThePage = cmsManager.CreatePage(txtTitle.Text.Substring(0, 50), new Guid("cced7579-2e2e-4939-9618-85cff81949d0")); 
     

    If I remove that Substring, I risk getting a Nolics exception if the user inputs a title over 50 characters.

    Can I simply edit the database table to allow for more characters or is there more to it than that?

    Thanks,
    Jeff
  2. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    10 Sep 2009
    Link to this post
    Hello Jeff,

    It is not possible to use page name longer than 50 letters. The value is set in the db class and even changing some parameters in your database you will get errors from Nolics.

    All the best,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  3. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    10 Sep 2009
    Link to this post
    Thanks for the quick answer, Ivan.

    I'll have to create a Page Title field in the GenericContent item I associate with each page.

    Jeff
  4. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    11 Sep 2009
    Link to this post
    I just realized, the "Name" parameter in CreatePage refers to the file name in the URL. This is going to be a big problem for me.

    I'd say more than half the pages I'm migrating over to Sitefinity have a file names longer than 50 characters. Long, human-readable URLs are a feature of my web site. Internet Explorer supports URL lengths of up to 2,083 characters.

    When moving to OpenAccess for 4.0, I hope you will be much more generous with the file name length.

    In the meantime, can you give me guidance on solving this?

    Do additional URLs have the same 50 character limitation?

    is there a way for me to hook into the HTTP request and map my longer file names to Sitefinity page? For example, when a GET/POST request comes in on a particular URL, I look it up and pass the page ID onto Sitefinity?

    I need to continue using long file names somehow.

    Thanks,
    Jeff
  5. Ivan Dimitrov
    Ivan Dimitrov avatar
    16072 posts
    Registered:
    16 Jun 2017
    11 Sep 2009
    Link to this post
    Hi Jeff,

    AdditionalUrl Maximun length is 250. Its value is stored under sf_CmsUrl. Using AdditionalUrl should do the trick.

    Kind regards,
    Ivan Dimitrov
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
    Answered
  6. Jeff
    Jeff avatar
    124 posts
    Registered:
    05 Aug 2007
    11 Sep 2009
    Link to this post
    That works for me.

    I checked my site and the longest URL I have, including path, is 155 characters. I'll be mindful of the 250 character limit for future pages.

    I do hope you will give us more flexibility in this regard for Sitefinity 4.0.

    Jeff
Register for webinar
6 posts, 2 answered