Converting PageReference to Url sets page id as URL

Member since: 2010

Hi, I had a block type with PageReference as property type. Now, I've changed the property definition to:

        [Display(
            GroupName = SystemTabNames.Content,
            Order = 100,
            Name = "Link")]
        [Searchable(false)]
        [Required]
        [CultureSpecific]
        [BackingType(typeof(PropertyUrl))]
        public virtual Url LinkUrl { get; set; }

Now, the value for fields that were set prior to this change is now, for example, 75 (in plain text) -> So the URL on start page is localhost:12354/75.

Now, should I always fetch the page from contentloader and get the proper URL (if I am having a number as URL) or there is a better way since this is not really a solution as 75 is set to external link and the editor will not be able to make use of the link editor.

 

#84739 Apr 07, 2014 10:32
  • Member since: 2005

    I'd say write a batch routine that converts to the value better suited for the new property.

    #85703 May 02, 2014 11:50